Cleanup the NetworkDeviceHandler tests.

Removes the need for a *ForTest function and friend declarations in NetworkDeviceHandler.
Fixes the tests for error_callback invocation, which weren't correctly tested before.
While there, does some other minor cleanups.

BUG=323537

Review URL: https://codereview.chromium.org/107693003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240079 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 240079