Replace all the hardcoded tilestrem URL occurences with a var
Fixes some minor errors in TileStreamSource.js
Adds js snippet to site_base_data.html
Merge pull request #201 from gem/vuln-fix-eval-of-im

vulnerability: fix serialization of 'evaluation_of_im' field
change models for 'func_distr_shape' from foreign key to choices (accordingly with the 0.3 specs)
Merge with current origin/master

Conflicts:
	openquakeplatform/openquakeplatform/static/js/hazard_viewer.js
Replace tilestream urls in hazard_viewer.js
Small refactoring, added a leading / to url
Removed trailing / from TS_URL var
Add two missing leading slashes on TS api
Removed trailing / from TS_URL var
Fix missing slashes in gxp_tilestreamsource
Merge pull request #187 from gem/rm-ts-hardcoded

Replace all the hardcoded tilestream URL occurrences
convert func_distr_shape type from foreign key to integer choices
Merge branch 'vuln-default-shape' into vuln-db03

Conflicts:
	openquakeplatform/openquakeplatform/vulnerability/models.py
add constraints on minimum_im and maximum_im based on function type
add evaluation_of_im field to EmpiricalModelInfo class
add mean_var_coef and sd_var_coef fields to FuncDistrVulnCont class
extract MODEL_TYPES from AnalyticalModelInfo and renamed it as ANALYTICAL_MODEL_TYPES
add specific CC_AnalyticalModelInfo for CapacityCurve