Added global document register to Document class.
Revert "Added global document register to Document class."

This reverts commit b2a29d3ee195ca2ac18fa90ecb4f8960f651e2e4.
Added capability to autoregister document classes on startup (this makes it much easier to load related objects etc.). Is turned on by default but can be turned off using the autodiscover_classes option in the backend class.
Added passing-through of extra arguments from derived to base backend.