txnutil: factor out the logic to read file in according to HG_PENDING...
txnutil: factor out the logic to read file in according to HG_PENDING
This patch adds new file txnutil.py, because:
- transaction.py is too large to import small utility logic
- scmutil.py or so causes cyclic importing in phases.py
mayhavepending() is defined separately for convenience in subsequent
patch.