Various fixes to resources.py
Create Subsample and SubsampleType resources

misc fixes
Expose Subsample and SubsampleType via API, misc fixes
Add chemical analysis and reference resources, misc fixes.