1. You can use the Licensing library. The license validation will only work if the app was installed from Google Play. It is up to you to decide what to do if the license is rejected.
2. I don't think that it is possible. Why is it important for you?
Yesterday I've seen an app on the Play Store which extracts any app (nothing new). My thought was that it was generally very helpful to know where the app "came from". Licensing Lib is cool but there are no offline solutions to protect apps (at least I don't know a way).