3.1 deprecation fixes

This fixes deprecation notices for SilverStripe 3.1, however it also breaks compatibility with 3.0, so might be best to wait for 3.1 stable before merging.