Adds ability to delete requrds by complex queries.  Also fixes and re-enables some tests.
Merges from stable.