Fix some leaks in ImperativeRenderer and the pooling system.
Adjust some default pool capacities.