trim packagename if sideloaded, get versioncode

implement policy of not uploading package info when sideloaded
or through a non-playstore channel. Include versioncode information
when we do include a particular package.

Bug: 65027506
Test: watch logs and dumpsys for various package combinations
Change-Id: I8e601c899070b57c25181ba705e997f10ea052b4
3 files changed