Clean and harden Transaction.

* Replace boolean parameter with enumerated type.
* Get rid of std::ref.
* 80-column cleanups.
* Replace an std::bind with a lambda.

Reviewers: @HowardHinnant @JoelKatz