Fix issue with right aligned number buttons overlapping the label

This also simplifies button clipping which was attempting to detect
offsets that were applied afterwards,
Now apply text clipping after adjusting the button rect margins.
Fix compile on MSVC, we don't use "isfinite" anywhere else inside source/blender ;)
Game Engine: Level of detail support and tools

Levels of detail can be added and modified in the object panel. The object
panel also contains new tools for generating levels of detail, setting up
levels of detail based on object names (useful for importing), and
clearing an object's level of detail settings. This is meant as a game
engine feature, though the level of details settings can be previewed in
the viewport.

Reviewed By: moguri, nexyon, brecht

Differential Revision: http://developer.blender.org/D109
Style Cleanup
Style Cleanup: minor edits in recent changes
Error in last commit
UI: more fixes for text clipping

Were still cases where numbers could be clipped incorrectly and icon
size was accounted for twice when left clipping (error in own recent commit).
Code cleanup: Game Engine related panels belong into properties_game.py.
Fix artifact in partial buffer update after recent changes

The issue wasn't new in fact, just partial buffer update
function was still broken. Not sure how those issues were
not noticed for so long.

Perhaps partial_buffer_update_rect() could be simplified,
but i've got some more upcoming changes here which might
run into conflicts if i'll do simplification now.
Code Clenaup: use const for button checking functions
BLF: debug function to print a fonts state
Fix for button selection offset

Was using a different font size with selection and drawing,
But scaling both so they mostly matched.

This made selection shift noticeably when done on an interface zoomed in/out.
Color management: get rid of original byte buffer partial update

It was only used by opengl render and in fact it needed just to
set DISPLAY_BUFFER_INVALID flag for the image buffer.

In theory it wouldn't make any change to opengl render speed
(because this change just moved rect_from_float from color
management code to image save code). And could not see any speed
changes on my laptop.
Error in recent commit
Color management: added utility function to apply processor on a pixel

It applies color management on a pixel in a way, based on number of
channels of this pixel.

Simplifies partial update code a bit.
Fix T37842: missing 3D view redraw when editing group layers and offset.
Fix T37837: mirror modifier merge does not place vertices at the center.

This was broken since BMesh.
Fix T37843: area split widget missing in python console editor.

Python was indirectly causing redraw tags during drawing, which interfered
with the ARegion.drawrct, now ignore these during draw.
Fix T37790: OSL not rendering subsurface scattering color correct since upgrade to 1.4.
Fix T37705: texture panel order wrong when switching from cycles to blender render.