Implemented query() function in content provider. Some more query parame...

...ters will be supported later, to make some common querying more efficient. TestEnvironmentProvider was also updated. It now does not access db directly for any operation, all those go via content provider.