Added Mongo query support for profile (getProfileByQuery and getProfiles...

...ByQuery).