Fix loading of fonts with invalid encoding name entry (bug 859204 and 878112)

This PR fixes loading of fonts whose `Encoding` entry is an invalid name, by falling back to a predefined encoding and letting the font override the encoding if there is one available.

I created a reduced testcase for the bug, using: http://brendandahl.github.io/pdf.js.utils/maker/.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=859204.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=878112.