check_health: update from check_mariadb.py in puppet repo
check_mariadb.py in the puppet repo is a maintained copy of
check_health.py in this repo.
check_mariadb contained an embedded version of WMFMariaDB that wasn't
merged into this repo, which has diverged somewhat. This patch
updates WMFMariaDB.py with the non-refactoring parts of the divergence.
It also fixes user detection so that it should work under nrpe.