Fix up build

- Simplify and un-hardcode build parameters.
- Support Halide BUILD_PREFIX convention.
- Fix linker order for Halide binaries
Force device 0 on CUDA reference
Add internal best-of-N timing to Halide version

This still doesn’t force flush the pipeline. Results roughly
match nvprof timings, so it seems reasonable, but it may be 
unreliable or inaccurate.
Add PTX for fermi
Add Fermi machine code for hl_0 and sat