Simplifying the extends closure

Simplification [suggested by michaelficarra](https://github.com/jashkenas/coffee-script/pull/2860#issuecomment-15148137)
Additionally, the extends closure is now built using node classes
instead of using a monolithic CodeFragment