Added tenant_id in verification of instanceexists and instanceusages

The summary of the changes is as follows:
- added tenant_id to verification logic for instanceexists and instanceusage
- added migrations to add tenant to instanceexists and instanceusage tables
- added scripts to populate tenant in instanceexists and instanceusage tables from rawdata
- refactored some tests(extracted reusable methods)