Refactor the way we parse IDs in the /create textarea.

Less confusing logic gates, more breaking out into functions. As part of this,
now supports "http://doi.org" DOIs as well as the old "http://dx.doi.org" ones.

Fixes #79.