ART: Clean up obj_ptr.h and obj_ptr-inl.h .

Move ObjPtr<> member function definitions that depend on
other functions in obj_ptr-inl.h also to the obj_ptr-inl.h.
Use C++14 std::enable_if_t<> and C++17 std::is_base_of_v<>.
Improve kObjPtrPoisoningValidateOnCopy code readability
(avoid ternary operator). Move relational opeators to
namespace scope and reimplement != as negation of ==.

Also move PtrCompression<>::Compress(ObjPtr<>) to the
object_reference-inl.h which includes obj_ptr-inl.h.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I5116c0e322775c19a88687f30742ef654a8be873
4 files changed