ENH: Refactoring the CompositeTransform class

Prefer initialization to assignment (i.e. use class constructors
rather than resize variables).

Add const correctness, and use const references to temporary
local variables rather than copy constructing them.

Change-Id: I79a0dd7e3e22d3e5866b13b343c7f14296293606