Cache fonts by reference.

Fixes #2984
see also https://github.com/mozilla/pdf.js/pull/3343#issuecomment-19465301