Improvements to muc_log_http

muc_log_http now works with SQL storage.

My fixes were somewhat hacky, though, I'm not sure if this is really
the *right* way to do all this, but it seems to work.