Add file tests, clean up and simplify

Squashed commit of the following:

commit 14710083caa38a3830271950233b8c86d12a48e1
Author: Damian Jansen <djansen@redhat.com>
Date:   Mon Nov 10 12:35:03 2014 +1000

    Move apikey to constant, and html file data to static var

commit 37edef8882204c2d6b6061fc95c5053ba299cae7
Author: Damian Jansen <djansen@redhat.com>
Date:   Thu Sep 4 15:39:20 2014 +1000

    Add file tests, clean up and simplify

    - Test html, idml, dtd, odg/p/s/t File type upload
    - Use ZanataRestCaller rather than manually creating projects, versions
    - Remove unused imports
    - Add a null pointer check on opening files
Include original exception when SMTP send fails
Fix broken usage of translator api key constant in tests

Also adds an after function to one of these tests, to reset it.
Merge pull request #634 from zanata/fix-translator-api-test

Fix broken usage of translator api key constant in tests
Merge pull request #632 from zanata/smtp-include-exception

Include original exception when SMTP send fails
Remove untranslated and total from contribution stats:

Squashed commit of the following:

commit fe3de61aa77aa127e799ded714c3ceaa4023df0d
Author: Alex Eng <aeng@redhat.com>
Date:   Mon Nov 17 13:47:27 2014 +1000

    Modify contribution stats to remove duplication count in single target

commit 617ef8253c0d7d8ebdb4b546e4bdee933c9f88e6
Merge: 1cbf945 d5bf19f
Author: Sean Flanigan <sflaniga@redhat.com>
Date:   Tue Nov 11 16:55:18 2014 +1000

    Merge pull request #632 from zanata/smtp-include-exception

    Include original exception when SMTP send fails
Merge branch 'integration/master' into admin-page