Fixed issue: Minor Database fixes

- Fixed PHPDoc
- Fixed ORM::last_query
- Added Database::getLastQuery
Merge pull request #746 from sergeyklay/master

Minor Database fixes