Move deprecation notice inside constructor of Query class

* Query part deprecation moved to __construct()
* Unit tests skipped that consume Query class