Refactor BaseResource.extendAs to properly setup root

BaseResource.extendAs takes a constructor function.
No resource classes define instantiate, they use the above.
This ensures resource.root is always correct.
Merge pull request #34 from mattdenner/fix_base_resource_reference_to_root

Refactor BaseResource.extendAs to properly setup root
Merge remote-tracking branch 'sanger/master' into T45_3_batch_save

Conflicts:
	app/scripts/mapper/s2_batch_resource.js

Resolution of merge from master