Add proper texture invalidation mechanism via signal.
Refactor texture class.