Code cleanup: const args and arrays
Fix T34993: "Jump to Next Keyframe" shortcut not related to the timeline viewable keyframes

Made the timeline option to only show keyframes from selected channels/data be a
per-scene setting instead of the per-timeline option it was previously. This makes
it easier for animators working on rigs with multiple bones (especially during the
polishing phase), since now the timeline and jump to keyframe operators use the same
setting to decide which subset of keyframes they need to consider.

By default, this option is enabled by default.

TODO: Extend this to the keyframe status shading on the active object name in the 3D view?
Code cleanup: cycles baking

- remove unused headers
- respect 120 line length
- indentation
- was assigning all props to 'ot->prop' for no reason.
Bake api cleanup: use RE_bake_ prefix.
Bake api: define TriTessFace verts as an array (avoids copy)

- no need to calloc hit array.
- rename smoothnormal is_smooth
Bake api: include cleanup
Correct some errors in auto-cleanup
Code cleanup: style, unused import
Cycles-Bake: Internal save mode should be the default (since external is not even in the ui)
View3D: Tweak GLSL preview, use only lamps enabled in active render layer and material light group.

This change makes lighting in GLSL preview more accurate, though it still
doesn't support material's "Exclusive" option.

Technical note: Changes in view3d_draw.c are not essential, these avoid
preparing unused shadow buffers.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D457
Fix T39919: Collada export crashes blender when using a "Copy Location" constraint
Code cleanup: avoid warning about bit-shift outside int range
Merge branch 'master' into bake-cycles
Cycles-Bake: external saving is working again (though there is no UI)

Right now you can set it via the operator or via the scene properties:
bpy.ops.object.bake(filepath="/tmp/baked.png", save_mode='EXTERNAL', use_split_materials=True, ...)

bpy.context.scene.render.bake.filepath = "/tmp/baked.png"
bpy.context.scene.render.bake.save_mode = 'EXTERNAL'
bpy.context.scene.render.bake.use_split_materials = True # or False