gallivm: fix cube map LOD computation
First, this undoes commit
e503af4baa2c709ae5743bb278b277d3faaba076
so we use iround() in lp_build_nearest_mip_level().
Second, in lp_build_sample_general() we need to check if we're sampling
a cube map before anything else. Choose the cube face and then recompute
the partial derivatives of (S,T) with respect to the chosen cube face.
Before, we were using the directional (S,T,R) derivatives to compute
the LOD.
Third, work around an apparent bug in LLVM 2.7 where setting the lod
variable to a const(0) value results in bad x86 code. See comments in
the code.