Refactor test_parsing

Add assert_parse and remove global variables.
Fix downloading multiple resources with the same format

The resources of a lecture were stored in a dictionary, indexed by
their format. This meant that if a lecture contains more than one
resource with the same format (e.g. multiple pdf files), only the last
one gets downloaded. This commit fixes this problem.
We add the title of the resource to the filename of the downloaded
resource. However, for backward compatibility, we only do this for the
resources that we did not download because of the bug.
Merge pull request #160 from jonasdt/fix_resources

More sweetness from Jonas:

Fix downloading when multiple resources of a kind (say, PDFs and annotated PDFs)
are present in lectures.

This closes #65 and #72.