p12n_extract.py - complete rewrite

Code has been cleaned up (shortened lines to 80 characters).

From a functional point of view: instead of generating a static .html
file with errors, I’m creating a separate errors.json file that can be
used to create filterable views in PHP.
Merge pull request #336 from flodolo/update_p12n_extract

p12n_extract.py - code refactor