Apparently working well. clang-formatted.

Because of clang-format and my unwillingness to risk losing the magic
combinations of fixes, it is impossible to see what exactly changed in this
commit.

The most important things involve setting stack_ptr=0 (per @mattskala's tweet)
having to be reset after every parse (success or failure), and resetting
indexed_pattern to NULL after every call to process_file_indexed().
Adding index.* to this branch too.