SystemMemoryTest: Introduce Device class.

As an abstraction to hold common utilities for interacting with the
device.

Also, coalesce exceptions into a new common TestException class.

Bug: 111830582
Test: atest -v system-memory-test
Change-Id: Ia297427bdcabce38631e7f760149d58c8a5bdd27
5 files changed