tryRegistrationImpl: better error checking

ifstream is_open does not check for errors, so we use ifstream operator
bool instead, and we use it more frequently than strictly needed. Also,
the functions here are added to attribute noinline, so that stacktraces
will be more useful.

Test: boot and check names are fixed up in `ps -A -o comm`
Bug: 161271113

Change-Id: Ia451fa1b06c49def0fe8b3a3558af83fff18ec96
1 file changed