Refactor testdevice
Summary
I moved TestDevice into its own files as part of !91 (merged). It didn't end up being necessary for that work, but it still might be useful in the future
Test Plan
./tests/testnotificationlistener still builds and passes, so nothing has really changed.