Replaced id with instancetype in various -init methods.

Also replaced return type with instancetype in some class methods that
act as constructors.