Added LIMIT 1 to insertRowReturnID() query

Change-Id: I5e633ad1a03da0e3ef5dd6ccfad9da5b9b376300
Replaced DataConfig's getEntityIds() with searchPublicMetadata() and
searchPrivateMetdata() because the implementation was inefficient.
AdminService no longer allows searching private metadata at the same
time as public metadata (wasn't used anyway).

Change-Id: Ied9b68308c41744f65e437b75ff6a56707dc469d