Refactor dbActivityLog logging in execute().

I'm still running into decoding issues on certain customer
computers in the sql.decode() call (utf8 codec can't decode code
byte ...). Trying to sort it out I noticed repeated code for all
these activity log calls, so I refactored them into a new function
to simplify the code.
Merge branch 'working' of github.com:dabodev/dabo into working