Fix function name logging for db queries

At the moment db_query_bound is using a wrapper to db_query (or the other way around).

As what we actually want for the DATABASE stuff is a log of what caused a query to be generated,  we need the level back from the db_query/bound call.

For other functions e.g. log_email/soap/filter etc, we generally want to know where the log entry was generated - as opposed to "two steps previously" , hence the special case.