Cleanup PatternMatch. NFC.

Tidy up the code a little by using 'auto' when the type is obvious, doxify the
comments, and clang-format the file.
Reorder the code to avoid inserting at the beginning of a vector.

As per dblaikie suggestion, thanks\!
Remove unneeded curly braces.
Fix another GCC build failure from r223802