Delete shader objects early instead of late.

Less error prone. Also saves some memory.