Bug 1101492 - Improve ActionLogDB

Good question. It's how it's implemented now in action_log_db.js
We should refactor this better, but when we've more time ... ¿agree?