Proposal: Use 'instancetype' as return type for factory methods

This is the preferred return type for factory methods and increases type safety.

I used search->replace but checked that no warnings/errors were added during this refactoring.