Stop validating given cookies file

Specifying a cookie file is only necessary for debugging purposes or if
the coursera authentication has changed. Hence, we should not validate
the cookies file as the validation makes some possibly outdated
assumptions.
Add define module

This module defines the global constants.
Add cookies module
Move cookie handling functions to cookies module
Add get_cookies_for_class

Move the remaining cookie handling logic to the cookies module.
Log HTTPError message
Add _cache path

We may move this to another place if desirable.
Add utils module

This module provides utility functions that are used within the script.

Add  tests for clean_filename and get_anchor_format
Cache cookies

Caching the cookies prevents us from repeated authentications and makes
us a good netizen by reusing the session.
The cookies are saved in the Mozilla cookies.txt file format which
allows us to to some post-mortem analysis.
PEP8: E501 line too long
Add newline at end of .gitignore
Renew stale www.coursera.org session

Expired cookies are automatically removed, but it is always possible
that a www.coursera.org session becomes stale even if the cookie is not
yet expired (for instance a session time-out). If this happens, we
renew the session.

Remove two redundant tests.
Renew stale class.coursera.org sessions
Catch KeyError

Yes, sometimes python trows too much exceptions.
Merge pull request #146 from jonasdt/cookies

Add Jonas's work to improve modularization of the code:

* Add a module for cookies/authentication
* Add a module for internal utility functions
* Add a module for constants
* Make cookies cached
Merge remote-tracking branch 'upstream/master'