Replaced console.log with debug module such that debug messages can be turned off.

I've noticed that "init transaction!" was printed every time I started a transaction. This message couldn't be disabled since it was printed using console.log.

I've removed the console.log and replaced it with the debug module such that users of this module can turn debug messages on and off. Also, I've added debug messages for commit and rollback.