Move jshint rules into jshintrc and include from Gruntfile.
Add async parsing option.

In my testing, the major time sink is parsing. This commit adds a setTimeout() around parsing
of each item so control can return to the browser. This increases the total time it takes to finish
a screenshot but will not freeze the browser when it does. This is a good option when e.g. doing
error reporting, where you might not want to freeze the browser while sending debugging information
back to your server.
Speed & accuracy improvements to pseudo element rendering.

Previously, pseudo elements would be processed as they were found in the DOM tree, which was
an expensive operation as each element's computed :before and :after style was checked for
'content' styles.

This commit traverses the user's stylesheets for :before and :after selectors, gathers the classes
affected, selects all elements that likely have a pseudo element present, then checks computed style.
If there is actually an element present, it is created but *not* appended to the DOM until after
all elements have been processed.

After all elements have been found and created, they are added to the DOM in a single batch, and the original
pseudo elements are hidden in a single batch. This prevents the layout invalidation / relayout loop that was
occuring previously, and in my tests speeds parsing by as much as 50% or more, depending on how many
pseudo elements your page uses.

Additionally, this commit contains a bugfix to the handling of ":before" pseudo elements; the browser effectively
inserts them as the first child of the element, not before the element. This fixes a few rendering inconsistencies
and complicated pages look almost perfect in my tests.
Merge pull request #269 from ssafejava/jshint

Move jshint rules into jshintrc and include from Gruntfile.
Merge pull request #270 from ssafejava/parseSpeed

Speed parsing by as much as 50% & add async parsing option.
Add dom depth information to render queue
Add tests for background-size
Fix missing background color bug
Implement background-size cover/contain
incorect z-index sorting fixed

If you omit compare function in javascript `sort()` method it will sort  lexicographically (in dictionary order) according to the string conversion of each element. 

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters

For example 
[0, 9, 8, 10].sort()
will place element with z-index 10 on 2nd position of the array
Merge pull request #297 from Grom-S/patch-1

incorect z-index sorting fixed
Fix invalid selector exception with empty class values

After removing :before and :after pseudo selectors, a class name may be empty, causing an invalid selector string when joined. Remove empty elements before calling querySelectorAll.
Update pseudoelements.html
Fix bug in WebKitGTK+, backgroundRepeat return "wrong" values
Add all js files to grunt watch
Fix z-index ordering bug
Merge branch 'patch-2' of github.com:brcontainer/html2canvas into brcontainer-patch-2
Refactor background parsing
Merge branch 'patch-1' of github.com:bensho/html2canvas into bensho-patch-1
0.5.0 rewrite