Rewrite 'parse_tag_lines' function

- Add documentation for parse_tag_lines and related functions
- Alter 'post_process' related functions to be more consistent in
  parameters and return values
- Add improved algorithms for 'create_tag_path' function
- Merge 'unescape_ex' function into 'process_ex_cmd' function
- Other small improvements
Add additional unit tests

- Add additional unit tests for 'parse_tag_lines' and related functions
- Move duplicated program-creation code into specific functions