ART: Add option to retain lock levels in verifier

Templatize SetRegisterType to be able to retain lock levels. When
sharpening a type, e.g., in a branch after an instanceof, the
verifier should remember if the register had been locked before
and not implicitly erase that information.

Bug: 23502994
Change-Id: Iba62688a536792da0920598fecdbf24a4993ec04
7 files changed