Improve the flake8 line-matching regex
Improve the flake8 line-matching regex

Summary:
Because the character offset group is optional, the logic for dealing
with the previous index-based match object was more complex than it
needs to be. Switching to named groups makes this clearer.

As an example of how this was causing a problem, when the character
group *was* present (at index 3), it was being appending to the linter's
name in the call to ->setName(), resulting in confusing linter output.
We may have also been setting the character offset to the error code's
string, too, which is further nonsense.

Because we reliably capture the flake8 error code, I don't think there's
a need to append it to the linter's name at all now, so I removed that
part (so it's always just `flake8`), but it's not a problem to restore.

Lastly, I hoisted `$regex` out of the loop because it's a constant and
de-indenting it gave me enough room to continuing writing it all on one
line.

Test Plan: Tested primarily with flake8 3.3.0

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17552

phacility/arcanist,Khan/arcanist,phacility/arcanist,r4nt/arcanist,phacility/arcanist,aik099/arcanist,codelabs-ch/arcanist,Khan/arcanist,uber/arcanist,phacility/arcanist,folsom-labs/arcanist,folsom-labs/arcanist,codelabs-ch/arcanist,codelabs-ch/arcanist,aik099/arcanist,r4nt/arcanist,fivestars/arcanist,uber/arcanist,fivestars/arcanist,r4nt/arcanist,phacility/arcanist,folsom-labs/arcanist,uber/arcanist,fivestars/arcanist,folsom-labs/arcanist,aik099/arcanist,aik099/arcanist,r4nt/arcanist,fivestars/arcanist,Khan/arcanist,Khan/arcanist,codelabs-ch/arcanist,uber/arcanist,codelabs-ch/arcanist