Optimize context-creation-and-destruction test

This test is very long-running, and taking out the unnecessary Uint8Array
construction on every iteration reduced run time by roughly 5% on a
high-end workstation. Additionally, query maximum texture size only once
for some more marginal gains. The changes have no significant effect on
test coverage and are also done to the 1.0.2 version of the test.