Minor Database fixes

- Fixed PHPDoc
- Fixed ORM::last_query
- Added Database::getLastQuery