Fix UnicodeError with anonymous student IDs

**Background**: Course IDs are allowed to contain unicode characters, but `anonymous_id_for_user(user, course_id)` currently throws a `UnicodeError` exception if it is given a course ID with non-ASCII characters. This pull request fixes the issue and adds a new test covering this case.

**Discussion**: Myself, @antoviaque, @mattdrayer have discussed this after we became aware of this due to test failures caused by this issue on the solutions fork.

**Affects**: `common` code, known to cause test failures in LMS under certain conditions, and likely would cause real-world errors in the LMS as well, for any courses with unicode characters in their course ID.

**How to reproduce**: Run the included test case without the fix to `models.py`

**Urgency**: Low-Moderate - Unknown if it is affecting any real installations.

**Authorship**: This is a contribution from OpenCraft.

Related comment: At some point in the future, I assume, we will want to get rid of `to_deprecated_string`, in which case this line will become `hasher.update(unicode(course_id).encode('utf-8'))`. That change could even be made now, but it changes how anonymous IDs are calculated, resulting in new hash values that won't match any previously generated hash values / anonymous IDs. Although previously generated anonymous IDs always get stored in a database and such a change is thus totally backwards compatible, there are a couple of unit tests and a runtime warning that are explicitly designed to catch such changes in how the digest is calculated. So for now I've stuck with the most clearly backwards-compatible route.
Yes, the test fails without my fix. Also, the code *does* allow Unicode values in the "run", so maybe there is a bigger problem. In my test I use `CourseFactory.create(display_name=u"Omega Course Ω", ...)` and if you look [at how CourseFactory works](https://github.com/edx/edx-platform/blob/master/common/lib/xmodule/xmodule/modulestore/tests/factories.py):

```python
        name = kwargs.get('name', kwargs.get('run', Location.clean(kwargs.get('display_name'))))
        run = kwargs.get('run', name)
```

and as you can see, `Location.clean` [does allow Unicode values in the locator](https://github.com/edx/opaque-keys/blob/master/opaque_keys/edx/locator.py#L502):

```
>>> Location.clean(u"Omega Course Ω")
u'Omega_Course_\u03a9'
```

The opaque keys code accepts any chartacers as a locator except `DEPRECATED_INVALID_CHARS = re.compile(r"[^\w.%-]", re.UNICODE)` and since the Unicode flag is set, the `\w` will permit "whatever is classified as alphanumeric in the Unicode character properties database".