Minor fixes in db_query and base_document
Changed how defaults are set when creating new documents
Fixed _fix_numeric_types