Sharpen the patterns.

Draw the patterns with the intended resolution instead of scaling
afterwards. Scaling leads to unclear patterns.

Also:
Make TilingPattern function for paintType switch case.
Make TilingPattern function for bbox clipping.
Make TilingPattern functions for scaling code.
Increase MAX_PATTERN_SIZE to 4096.
Add Singular Value Decomposition function.
Merge pull request #2177 from kkujala/tiling

Sharpen the patterns.
CSS fixes to the sidebar.
No need for a 15px margin, and links should have a pointer cursor.
Merge pull request #2848 from waddlesplash/css

CSS fixes to the sidebar
Hack to support automatic printing from pdf javascript.
Merge pull request #2839 from brendandahl/auto-print

Hack to support automatic printing from pdf javascript.