lib: prepare for multiple contexts (initialize cuda only once)
testlib: use 100 iterations by default