Vertex Shader: Zero OutputVertex to avoid denormals

Unused OutputVertex attributes were being left un-initialized. The
leftover garbage sometimes decoded as floating-point denormalized
values, causing fallbacks to microcode and massive slowdowns in the rest
of the rasterization pipeline even though the results were unused. By
zeroing the structure we ensure these attributes only contain harmless
zeros.
Clipper: Avoid dynamic allocations

The triangle clipper was allocating its temporary input, output and work
buffers using a std::vector. Since this is a hot path, it's desirable to
use stack allocation instead.
CMake: Require Boost 1.57.0 (fixes Travis OS X)
Clipper: Compact buffers on each clipping pass

Use a new buffer management scheme in the clipper that allows using a
bounded minimal amount of buffer space. Even though it copies more data
it is still slightly faster likely due to using less cache.
Rasterizer: Common sub-expression elimination

Move the computation of some values out of loops so that they're not
constantly recalculated even when they don't change.
GPU: Bitwise texture swizzling

Replace the loop-based texture address swizzling code by a bit-twiddling
implementation, providing a very small speed up. Also simplify
addressing code.
Rasterizer: Pre-divide vertex attributes by W

Execute the division-by-W for perspective-correct interpolation of
values in the clipper, moving them out of the rasterization inner loop.
Merge pull request #351 from yuriks/optimize

Rasterizer Optimizations
Move ThreadContext to core/core.h and deal with the fallout
Kernel: Move Thread's definition to the header file
Thread: Move CreateThread into a static Kernel::Create function
Thread: Move Get/SetThreadPriority to be Thread members
Thread: Move more helper functions into members
Thread: Convert some uses of handles to pointers
Thread: Move StopThread to a member function
Thread: Move ResumeThreadFromWait into member function
Thread: Remove unused static global
Thread: Convert waiting_threads list from Handle to pointers
Thread: Convert wait_handle member to a pointer
Thread: Replace a for-loop with range-for