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
Merged-In: Ia451fa1b06c49def0fe8b3a3558af83fff18ec96
(cherry picked from commit d682c0e34c35266eca3b48de9ec6439eb674310a)
1 file changed