Add tests for getBuildInfo + add opt. for non-cacheable info

Non-cacheable info is required when the internal status of CL
objects changes, such as the case of a program build info.