Add support for caching change meta-data.

Caching meta-data is accomplished using git notes. Meta-data
includes target branch, parent branch and change ID.

Details:
- Cache meta-data in a note when creating a change
- Ensure notes.rewriteRef is set to the appropriate ref
- Factor configuration logic out of main and into a new configure
  function
- Add functions: set_config_option, write_note and read_note

Change-Id: Icccd1fa1926a8470f04249672cd09051fa299365