updated to latest libs and cleaned the code

This commit may not be able to find
relationships anymore, when older pouch db is used!

also added new improvements and bug fixes:
* polymorphic relationships
* _skip and _limit special query params
* uses findAll if findQuery doesn't have any non-special params
* consistent relationship ids
* more tests