Ignore trailing space in DOIs and trim URLs more generally in backend

Fixes #1539
Add asset replace controller to upload new revisions

See #1593
Also rename Timeseries to TimeseriesAsset in the process.
Don't assume pbs job suffix (but do assume default)
fixed js error on materials edit page - was trying to do angular form stuff on non-form object
Fix non-timeseries asset selection for offset 0

Noticed by scala 2.11
Merge branch 'excerpts'