Implement a basic, light sanitized version of filename sanitization.

This is potentially dangerous (we are external sources write almost
arbitrary strings as filenames), but some people may need filenames from
higher portions of the Unicode space.

This is still *not* hooked via a command line option, but is only for
evaluation purposes, to address issues pointed in comments of bug report

Still, the default will be to keep backwards compatibility and the user will
have to knowingly enable this feature.

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
Encode local_page to utf-8

Otherwise we can get "UnicodeEncodeError: 'ascii' codec can't encode
characters in position …" errors
Add --clear-cache option

Allow users to clear the cache.
Return boolean in do_we_have_enough_cookies
Remove stale session from cookiejar
Rename do_we_have_valid_cookies

Because function mutates the cookiejar
Remove retry in _get_authentication_cookies

The stale session is removed in validate_cookies, so we don't need the
`retry` anymore
Merge pull request #209 from jonasdt/cache

Be more careful with stale cookie sessions. From Jonas, closes #208.
utils: Strip also newlines from filenames.

Otherwise we get problems when calling external downloaders.
coursera: Hook the restriction of filenames to the main program.

The implementation sucks right now and we should *sincerely* get rid passing
each attribute of the `args` object to functions. The better thing is
probably to simply pass `args` and let the functions use the parts of it
that they need.

Really, a function with more than a dozen parameters sucks, especially when
we are duplicating things that are already readily available.
utils: Update docstring to reflect reality.
coursera: Attribute meaning to strings that will be filenames.

This still sucks, especially my choice of names, but my brain has stopped
two hours ago and I should be sleeping already.
Merge branch 'restrict-filenames'

This closes #199, #201, #206.

Conflicts:
	coursera/coursera_dl.py