Move profile registration from bindApplication to LoadedApk

In order to capture profiles for apps which share the same VM and for
splits loaded without restart we need to move the profile registration
closer to where we create the class loaders (since bindApplication is
not called multiple times).

Moving the registration after class loader creation also allows us to
not profile apks which are already fully compiled.

Bug: 27539488
Bug: 27893309
Bug: 28012567
Change-Id: I6333f026f4f0680ca28e989f1686e3eac1145339
2 files changed