Make error page nice

This stops the error page from being a blank white screen, and also logs qiita_pet errors to our qiita logger for later handling.
it looks like the error will be only logged if the system settings are `debug`. It does not make any sense for me; I think they should be always logged.