Adding filter to skip individual checks during review.

If a "vip-scanner-skip-$check" filter returns true the check will be skipped. Skipping a check generates a warning. `$check` is the name of the check.

Analyzers can also be skipped using this same filter.
Fixing check get_path bug.

BaseCheck::get_path() checks to see if the scanner is an instanceof
`ThemeScanner` but this is not correct as its parent class
`DirectoryScanner` actually implements the `get_path()` function.

Changing the BaseCheck::get_path() function to look for subclasses of
`DirectoryScanner`.
Adding infrastructure for async scanning.

The `VIP_Scanner_Async` class sets up a number of interfaces for
performing scans in an async manner. It exposes a couple of AJAX methods,
and a cron scan. All scans done through the async scanner have their
results cached.

The `VIP_Scanner_Async` class also adds an admin bar node displaying the
number of issues in the last theme review.

Note that reviews done by normal means (going to the VIP Scanner page)
don't yet get their results cached. This is a todo.

See: #73
Adding VIP Scanner Async JS.

This provides a JS api for interacting with and parsing the results of the
VIP Scanner AJAX API.
Colourizing admin bar scan results.

Scan results will now be colourized based on the errors in the results.
Red if there are blockers, orange if there are warnings, and green if
everything is okay or there are notes.
Adding version number to cached review transient.

When we upgrade the VIP Scanner version number, we shouldn't be trying to
load old cached theme reviews
(https://github.com/Automattic/vip-scanner/blob/master/vip-scanner.php#L430).

This is because the structure of the `VIP_Scanner` or any of the other
objects we have may have changed - which can cause a fatal error if the
cached transient differs from the current one.

Adding the version number to the transient key ensures that if we do a
version upgrade old reviews are no longer loaded.
Renaming skip check filter.

Renaming the filter `vip-scanner-skip-$check` to `vip_scanner_run_check`
and passing `$check` as a variable to avoid having data in the filter
name.

From feedback received on #92
Adding nicer formatting for analyzer attributes.

This allows numeric, boolean, and array attributes to be properly formatted.
Adding PHP token parser.

The PHP Token Parser class takes in the contents of a PHP file, gets the
tokens from the file, and spits out a more organized view of the file.

Specifically the token parser turns the flat view of tokens into a
hierarchical view of the code structure - identifying which functions lie
within which classes, which functions are called where etc...
Converting AnalyzedPHPFile to use the PHP Token Parser.

The token parser solves some problems where the regular expressions within
`AnalyzedPHPFile` would cause PCRE to segfault, and crash the program.
This new regex-free aproach is also much faster.

Also converting the analyzers to use the slightly modified output
structure.

Closes #97
Adding unit tests for AnalyzedPHPFile class.

Most of the basic parsing functionality is tested within
`test-AnalyzedPHPFile`. Some slightly more extensive and real-world
scenarios are still needed.
Fixing statement in token parser that could cause an infinite loop.

The while() loop should check that it doesn't pass the bounds of the
array.
Adding UT for parsing braceless closures.
Adding checks so that malformed elements are not outputted.

This is usually indicative of bad parsing, but it's still best that we
don't output that.
Adding PHP function recognition in variable assignments.

Previously the use of internal php functions such as `isset()` were not
recognized in inside variable definitions. This is now fixed.
Adding unit test for code blocks.

Tests that code blocks in code are properly followed, and that things
following blocks are properly scoped.
Adding whitespace line number counting to Token Parser.

This may not track line numbers correctly yet, as we still need to count
line breaks in strings, docs, and comments.
Modifying async to be compatible with multiple different scans.

Currently the way that scan results are cached in the async scanner is
only compatible with running a single review on a single theme. In the
future we want to support the ability to scan a number of things with
different reviews as needed. This change makes the caching side of the
async scanner compatible with that goal.

As a result of how results are saved, the ajax api was also changed to
only give a summary of the current results. This is most meaninful in the
above scenario.

Additional logic will need to be added at a later date for meaningful ajax
apis when the scenario is implemented.

See #73
Adding filter to update cached scans on manual scan.

Added a `vip_scanner_pre/post_theme_review` filter to
`VIP_Scanner::run_theme_review()` that is used by VIP_Scanner_Async to
grab the result of a manual scan and cache it.

This way the async results stay up to date with manual scan results.
Adding async scanner results as a post meta.

The would not have been properly stored in the post body.