added support for CASCADE as per CouchDB/ORM etc

this is a pretty major BC break and there are likely still issues with some edge cases not covered by tests, but i think its an important feature to add to make it possible to efficiently deal with larger graphs of related documents without too much overhead.