Initialize OpenCL device on the main thread when pre-compiling kernels.

Else it would cause extremely hard-to-debug random crashes when interpreting
formulas with OpenCL.

And let's re-enable kernel pre-compilation with this fix.

Change-Id: Ib104bfdc3f56a02c052c837eb4bf3ecc95d562e0