Added Mongo query support for profile (getProfileByQuery and getProfilesByQuery).