Remove openmp stuff
Entropy coding sync works without parallelism, without SAO and without deblocking
Fix tiles when SAO or deblock is enabled.

Was broken by previous commit.
Remove filter_deblock function, which is not used and somewhat dangerous, since it doesn't take into account specific stuff about subencoders.
Add SLEEP() define
threadqueue
encoder_state_encode uses now the threadqueue
Add --threads <int> command line parameter
Free jobs as soon as possible
Improve decision about when to split into threads
Store search borders in a buffer for the whole picture
Add const for the buffers
Use new buffers for search
Take advantage of the new buffers to remove uneeded item assignment
search buffer has to be allocated tile-wise to avoid problems with wavefronts
Fix problems when image dimensions is not a multiple of LCU
Add encoder_state pointer to lcu_order_element, new worker_encoder_state_search_lcu function to run the search stuff on one LCU
Threads should be put in queue in wait state if we want to add dependencies later
Wavefront works with parallelism + deblock (still no SAO)
Update VS project files to link win32-pthread.

- I haven't found a good way of including external dependencies to VS projects
  yet. Win32-pthreads is assumed to be found at the same level as kvazaar dir
  and has the files x86/pthreadVC2.lib and x64/pthreadVC2.lib.

- Win32-pthreads also requires the pthreadVC2.dll to be in PATH when running
  the program. Not sure what to do about that yet. We might need an installer
  for windows to handle that.

- Disable openmp as it's no longer used.

- Stop linking Ws2_32.lib as that hasn't been used for ages.