handle empty params array() correctly
make sql_prune_logbook application-aware
make maintenance.php work; also allow to prune tables "profile" and "debug"