FIX allVersions doesn't fetch all versions when class is changed

Scenario:
* Create a new 'Page' and save.
* Change the page type to 'MyCustomPage' which extends 'Page'

When you call all versions it will only return MyCustomPage and its subclassed versions. It won't return 'Page' and any parent class versions.

This change sets the $baseClass and uses this instead.

I've made this change against 3.2 as whilst I believe it fixes a bug, its a behavioural change.