Add support for JSON response

- Update mysql_* functions to mysqli
- Output as JSON rather than strided lists
- Add example Rested file for debugging