port profile.php to mysqli API (addresses #22)
port profile.php to mysqli API (addresses #22)

* profile.php:
  - use mysqli API instead of MySQL API
  - remove duplicate queries for total mate and coffee count
  - reindent JavaScript
  - add mysql error handling (addresses #25)

coffeestats/coffeestats,coffeestats/coffeestats,coffeestats/coffeestats