Better handling of unsaved objects, code cleanup.
Better handling of unsaved objects, code cleanup.

- If aObject is null, throw an error
- If either aObject or bObject don't have an ID, call insert() first
- If aObject doesn't have an ID, give sensible results for all other functions
- Add documentation to most methods
- Cleanup code

Fixes #8

ufront/ufront-orm