i965: split do_wm_prog into multiple functions

Split do_wm_prog into

  brw_wm_init_compile
  brw_wm_do_compile
  brw_wm_upload_compile
  brw_wm_clear_complile

Add struct brw_wm_compile to be passed around them.
i965: split do_vs_prog into multiple functions

Split do_vs_prog into

  brw_vs_init_compile
  brw_vs_do_compile
  brw_vs_upload_compile
  brw_vs_clear_complile
i965: split do_gs_prog into multiple functions

Split do_gs_prog into

  brw_gs_init_compile
  brw_gs_do_compile
  brw_gs_upload_compile
  brw_gs_clear_complile
i965: enable threaded precompile

Add brw_shader_program_save_compile and brw_shader_program_restore_compile to
save/restore precompile results in the shader program.  When DeferLinkProgram
is set, we save the precompile results instead of uploading them immediately
because we may be on a different thread.

A few other modifications are also needed.  We introduce
brw_shader_program_precompile_key and initialize it during NofityLinkShader
because we cannot inspect the context during precompiling.

TODO: It looks like brw_select_clip_planes should not be used at shader
compile time.  Imagine the shader program is used by another context.