Minor code cleanup to address warnings found by Clang.

cherry-picked from internal Android branch
55617c82a73d84ff3695bdd5526159448262d009

Change-Id: I0f78ca6b8293c13d7dbb535556543f6ea9f4dd45
Throw NoSuchMethodError if RegisterNatives fails.

Bug: 9963858
Change-Id: I5b3ce3d3dbdc949e69f3389e2df19bcca5648d7e
Remove dependency on frameworks/native

Change-Id: I66e226f8390bd499e956b00e4088bc0e1e150cb1