Fix compile after last commit, casting to (bArmature *), kudos to JesterKing
Code Cleanup: comment unused define
Fix T37718: Texture compression missing

Make sure image will saved as (not over) after changing
it's type to Generated by clearing image's path in signal
handler.
Changes to partial update during rendering

Summary:
Mainly addressed to solve old TODO with color managed fallback
to CPU mode when displaying render result during rendering.

That fallback was caused by the fact that partial image update
was always acquiring image buffer for composite output and was
only modifying display buffer directly.

This was a big issue for Cycles rendering which renders layers
one by one and wanted to display progress of each individual
layer. This lead to situations when display buffer was based on
what Cycles passes via RenderResult and didn't take layer/pass
from image editor header into account.

Now made it so image buffer which partial update is operating
with always corresponds to what is set in image editor header.

To make Cycles displaying progress of all the layers one by one
made it so image_rect_update switches image editor user to
newly rendering render layer. It happens only once when render
engine starts rendering next render layer, so should not be
annoying for navigation during rendering.

Additional change to render engines was done to make it so
they're able to merge composite output to final result
without marking tile as done. This is done via do_merge_result
argument to end_result() callback. This argument is optional
so should not break script compatibility.

Additional changes:

- Partial display update for Blender Internal now happens from
  the same thread as tile rendering. This makes it so display
  conversion (which could be pretty heavy actually) is done in
  separate threads. Also gives better UI feedback when rendering
  easy scene with small tiles.

- Avoid freeing/allocating byte buffer for render result
  if it's owned by the image buffer. Only mark it as invalid
  for color management.

  Saves loads of buffer re-allocations in cases when having
  several image editors opened with render result. This change
  in conjunction with the rest of the patch gave around
  50%-100% speedup of render time when displaying non-combined
  pass during rendering on my laptop.

- Partial display buffer update was wrong for buffers with number
  of channels different from 4.

- Remove unused window from RenderJob.

- Made image_buffer_rect_update static since it's only used
  in single file.

Reviewers: brecht

Reviewed By: brecht

CC: dingto

Differential Revision: http://developer.blender.org/D98
UI: Theme Colors for Info space
Code Cleanup: comment unused functions
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