Rewrite queryDeviceInfo interface.
Previously the function may cause some unsafe issue. It is fixed now by introducing a template parameter.
Let surf.ocl use the new queryDeviceInfo interface.
Merge pull request #874 from pengx17:master_queryDeviceInfo_rewrite