merge-actions: make merge action a full featured object
This open the way for having "smarter" value as action, making the usage code
simpler and more flexible.
We have to explicitly use __bytes__ call in a couple of place because Python2…
Differential Revision: https://phab.mercurial-scm.org/D12114
#require emacs
$ emacs -q -no-site-file -batch -l $TESTDIR/../contrib/hg-test-mode.el \
> -f ert-run-tests-batch-and-exit
Running 1 tests (*) (glob)
passed 1/1 hg-test-mode--compilation-mode-support* (glob)
Ran 1 tests, 1 results as expected* (glob)