Memory optimizations

This PR reduces the amount of memory allocations during OpenTK startup by up to 70% (!) depending on the platform.