Merge 'graffic/unicode-python2' for the unicode tests.

See #260.

(cherry picked from commit d8349be9dff5089d8105920b9fbc647ef9cc2eb3)
(tweaked based on commit 314b93652363e2992c40d27f1f8e07d6fd0c709f)
Avoid an extra stat() call on cache lookups

Currently each cache lookup does stat() followed by open(). We can just
handle ENOENT from open() instead.

(cherry picked from commit 48c132bff387056ab311e40db6ba6bae51d95277)
Create cache entries atomically in FilesystemCache

The filesystem cache needs to ensure entries only become visible once
they are completely written. Otherwise multiple processes sharing
a cache directory could see empty or incomplete files while they are
being written by another process. Fixes #313.

This patch uses the standard write-then-rename dance for POSIX systems.
I'm not sure if it works on Windows though...

(cherry picked from commit 18ffd83655f11898d4f7f52e9ed47e892a6955b9)
Support files lists or tuples in Jinja2 assets block.

E.g.: `{% assets 'f1', ('f2', 'f3'), ['f4'] %}`
renders like `{% assets 'f1', 'f2', 'f3', 'f4' %}`.

It helps assets composition, enabling something like *varargs
(not supported by Jinja2).

(cherry picked from commit 2c2851f3049966e6738a07a06deeb544cb12aca0)
Fix cssrewrite filter dealing with hostnames.

(cherry picked from commit 7d76ec6f729e86d2ad71e1b8e0b70a72a66e8621)
Preserve exit status

Previously, webassets would always give exit status 1, which makes things that
use it think that it is failing.

(cherry picked from commit 17438b922f957bff370478075798b566c7d71612)
Make it possible to customize jinja extension in Jinja2Loader

(cherry picked from commit c8873e0027156807e1f4d1eea7c10e3760a50bb2)
Update some test filter outputs.

(cherry picked from commit 1abd59b284ceb2bfc1b83768a19b9e8e94d6a268)

Conflicts:
	tests/test_filters.py
Fix closing temporary files.

output_file descriptor was never closed.

(cherry picked from commit 3ca7a31fa01766c2f0ae2fac1ef974ea2c0e08e0)