creation of new branch for experimental animation tools
AnimSys2: Bone Rotation (aka choice of Quaternions or Eulers)

This commit introduces an attempt at allowing animators to choose to use 'euler' rotations for bones (currently, only the default rotation order is used... multiple rotation orders may be implemented later). Animators often request this feature, so it's time to prove to us that it's genuinely useful!

To switch between quaternions and eulers, use the toggles in the Transform Properties panel in PoseMode. This will switch (the active bone only) to completely using quaternion rotations or euler rotations. 
- this is a per-bone setting, but can be copied (Ctrl-C menu)
- animation curves for quaternions/eulers will only animate the bone when their respective rotation mode is active for that bone (i.e. if you insert keyframes for a bone using quaternion rotations, then switch the bone to use eulers, bone will not be animated rotating until euler-rotation keyframes are added, and visa versa)
- quaternion/euler rotation mode cannot be changed in the middle of an animation (it's not implemented, and I don't intend on doing so either... it's just asking for trouble in the long run)
- by default, quaternions will be used (to preserve backwards compatability) and also because they provide smoother interpolation + no gimble lock
- when switching between interpolation modes, there is conversion of the current rotation from quat<->euler (whichever direction is applicable) to avoid pops
- euler rotations here use standard euler interpolation. In other words, these are not quats masquerading as eulers under a fancy skin.

A number of additional notes:
- Most tools which involve rotation have been adjusted to work with this so far. 
--> Note: Copy/Paste of poses doesn't work with this yet.
- NLA pose blending is currently (experimentally) using a simple linear interpolation between euler values of poses. This may not well at all, and also there are some cases not covered by that yet.
- Improved the keyframing code a bit to add a bit of flexibility so that keyframes could be inserted without doubling up entries.
AnimSys2: IPO Drawing-Code (Part 1 of Cleanup)

Started cleaning up the drawing-code for IPO-curves.
* draw_ipocurves() has been cleaned up, with the inner loops being split out into two separate helper functions. The same will need to be done with some of the other functions too.

* Removed the ugly global pickselcode. This was only used in this file under certain conditions, so it seems fine to remove it. 

* Usual formatting and commenting tweaks to make this code less intimidating. This is in preparation for some future work on IPO-curves...
AnimSys2 - Copy/Paste Poses now works with the new rotation options
Merge from trunk 17215-17223
AnimSys2 AutoKeyframing/PoseLib tweaks:

* PoseLib now works with euler rotations too
* Attempted to implement autokeying on changing values in Transform Properties panel. This WILL be superseeded by a better method in 2.5.
AnimSys2: Ctrl R displays menu to set rotation mode

This hotkey allows the rotation of multiple (selected and visible) bones to be set at a time.
AnimSys2: Recentering Meshes with ShapeKeys

Meshes with ShapeKeys can now be recentered. Note that this may not be totally stable or thee may be some artifacts somewhere. However, in preliminary tests, this seems to work well enough.

Note: the only situation in which this will not work is if the object is showing a pinned shapekey. Perhaps it would be better to test for multiple mesh users instead, but feedback would be welcome on this...
AnimSys2: IPO-Drawing code Cleanup (Part 2)

* Split another function into smaller portions based on what those parts did
* Commented and formatted code
AnimSys2: ShapeKeys Recentering tweak

* Removed the check for pinned shapekeys (not really worth enforcing it)
* Replaced the check with one for multiuser meshes. Multiuser meshes being recentered have more issues than recentering shapekeys do.
AnimSys2: Shapekeys recentering fix (attempt 2)

Now meshes with multiple users are not ignored. Previous tests had shown that there was a problem, but it turned out to be a missing case.

Also, added note of bug with bone roll changing randomly on EditMode transforms to fix.
AnimSys2: Per-Segment Interpolation of IPO-Curves

It is now possible to define the interpolation that will be used to get from a keyframe until the next one is encountered.
With an Ipo-Curve in EditMode, only the selected keyframes will get the specified interpolation mode set. 
Out of EditMode, the interpolation mode will be applied to all the keyframes of an IPO-curve that is selected.

- When inserting keyframes for curves that have multiple types of interpolation in use, the interpolation mode of the keyframe immediately before the added one is used.
- Old files get converted automatically
- Subversion has been bumped up to 2, so that old files get converted properly.
AnimSys2: Bugfix for Insert Key -> Rotation entries not working
AnimSys2: Bugfixes for code from past few days

* Fixed the causes of several crashes that occurred, also added checks for a few more potential ones (or errors)
* New keyframes on new IPO-curves were being added with constant interpolation only
* Removed debug code
AnimSys2: Bone Roll Issues

In this commit, I've attempted to improve the situation of bone roll problems that occur with the recalculate bone roll tool, and also when extruding/moving bones under certain conditions.

What's changed:
* When transforming bones, as part of the recalculations done on every update, the roll of bones who have their tip selected will be recalculated using the 'z-axis up' method. Reported by Glenn Melenhorst on BA.org

* Split the 'z-axis up' and 'align z-axis to cursor' roll recalculation methods into separate functions that can act as callbacks. Refactored the auto_align_armature() function to support this. It was needed for the first major change to occur.

* As an experiment, I've changed the final step of the z-axis method to use mat3_to_vec_roll instead of atan2 directly. It currently seems to work better, but I'm not totally sure yet. Will check on this again another day...
AnimSys2: IPO-Editor Borderselect

There seems to be a consensus that the behaviour of the IPO-borderselect tool was far too messy. 
1. "It's too easy to accidentally select tangents of other keys". 
2. "When moving multiple keys, the handles for the selected keys (and only those keys) should move automatically with them"

I've modified the behaviour so that the following occurs:
* Only keyframes can get selected by borderselect (i.e. only the coordinates of the keyframe but not its handles are tested if they lie within the box)
* Handles of a keyframe which lies within the borderselect region will inherit whatever selection status gets applied to that keyframe. This is consistent with clicking on the keyframes individually.
AnimSys2: PyAPI Access for Per-Segment Interpolation
AnimSys2: Hide all handles (IPO Editor)

Added a new option to the View menu of the IPO Editor - 'Show Handles'. This is turned on by default, but when disabled, all handles on BezTriples will be hidden, making it easier to see the keyframes.
AnimSys2: Eulers for Bones Bugfixes

* AutoIK did not work with euler rotations yet. The conversions were still only being done for quats.

* Fixed spelling errors in tooltips
AnimSys2: Assorted IPO-code housekeeping

* Cleaned up more of the IPO-code. There's still a LOT of messy code lying around that needs attention

* Restored the double recalculation for curve handles when inserting keyframes, in light of some comments I discovered in messy code

* 'Alpha' sliders are now available when setting the colour of curve handles to help differentiate them from the keyframes. 

* Silenced compiler warnings in transform code due to changes in types for BezTriple vars