Add duration to epochs 

- Move queries to jpa package

Signed-off-by: Joel Kuiper <me@joelkuiper.eu>
Change min_dose max_dose to float in DB
Add Treatment, TreatmentDosing to Study Activity
Add Variables and MeasurementMoments to Study
Get rid of Unicode non-breaking space in generated IDs

 * They were super confusing!
Implement measurements resource in study
Return Period instead of Long for pg-interval