refactor mysql.js

Some mysql.js refactorings

- [x] single queries
- [x] transactions
- [x] retry wrapper