Various cleanups; add support for `clGetPlatformIDs`.