Address gcc -Wtype-limits errors.

- Fixes warnings in #19 and #16.
Strategies and runtime detection/choice of best algorithm
Modify strategyselector to work with VS2010.

- VS doesn't have snprintf.

- VS doesn't support GCC attributes.

- Add defines for __SSE__ and __SSE2__ on VS.
Merge branch 'strategy_selector'
Fix a small memory leak.

- Malloced pointer returned by alloc_yuv_t was not being freed in
  substream_encode.

- Remove use of yuv_t from encode_one_frame, as it's not used there anymore.
Pass preprocessor defines for supported intrinsics in VS2010 explicitly.

- _M_IX86_FP defines whether VS should generate code using SSE or SSE2
  instructions. It isn't correct to use it to check whether optional runtime
  optimizations should be compiled in. It's also not defined at all in 64-bit
  mode.

- So let's just keep it simple and give a list of everything that is supported
  as release optimizations. It's not clear from the documentation if all of
  these are really supported. It just list a bunch of intrinsics from these
  that are.
Do not allow more tiles than dimension in LCU
Cleanup of encoder_state_init and encoder_state_finalize
Iterable structure for sub-encoders (more flexibility)
Add function subencoder_blit_pixels
Remove USE_TILES define
Doc for encoder state
Always initialize tiles data structures (even with only one tile)
rename picture_init to picture alloc and picture_destroy to picture_free
Remove pic->pred_*
naming: alloc_yuv_t -> yuv_t_alloc dealloc_yuv_t -> yuv_t_free
Reference count for picture
bitstream_tell
Move bitstream write to a separate function, and add assertions about the part which should not write to bitstream.
Small changes to fix compiling on VS

- Added threads.h to VS project
- Included Windows.h in threads.h