Fix #1198, enable custom locale in template rendering, fixes links

reverts getpelican/pelican@ddcccfeaa952d2e1e24ceac94e5d66c73b57c01b

If one used a locale that made use of unicode characters (like fr_FR.UTF-8)
the files on disk would be in correct locale while links would be to C.

Uses a SafeDatetime class that works with unicode format strigns
by using custom strftime to prevent ascii decoding errors with Python2.

Also added unicode decoding for the calendar module to fix period
archives.
Fix test errors on OSX

On OSX, if LC_TIME and LC_CTYPE differs the output of strftime is not properly decoded
in Python 3. This makes sure that the 'utils.DateFormatter' and the related Jinja filter
'strftime' set the same value for LC_TIME and LC_CTYPE while formatting.

Also, '%a' is removed from DEFAULT_DATE_FORMAT in 'custom_locale' tests. OSX and *nix have
different conversions for '%a' ('Jeu' vs 'jeu.') and there is not a feasible way to handle
the difference for tests.
Fix HTMLParser related deprecation warnings in Py3.4
Patch docutils.io.FileInput to not use "U" mode in py3

"U" mode is redundant in py3 since "newline" argument replaces it and by default
universal newlines is enabled. As of py3.4, "U" mode triggers a deprecation warning.
Merge pull request #1381 from avaris/fix_1198

Fix 1198 and 729: Fixes links with custom locale and related OS X test errors
Merge pull request #1380 from avaris/py34_warnings

Fix for Python 3.4 deprecation warnings while running tests
Fix test_direct_templates_save_as_false test case

A non-existent asserts_called_count attr was used which would always
succeed, silently hiding the error.