Bug fix in TotalRotationFunction metric.

Replaced the metric x2 + x2 with x2 + y2 as it should be.

This actually has no effect on results (checked for 6 runs of different thickness)
because this minimiser is badly configured... it always prefers 0 0 0. Will try to
fix that now.
Possibly improved TotalRotationFunction and Perform3StepAlignment

The reason 'possibly' is because while I believe the method is improved,
the results are actually very similar to before. But now atleast there is
the possibility to find rotations around X and Y. Even though these seem
small in practice.

In Perform3StepAlignment:
- removed unnecessary gtol parameter from options
- altered BFGS to better behaving Nelder-Mead for minimisation of TotalRotationFunction
This doesn't need a step size as input, so it's more versatile. In testing with
6 different runs it behaves well.

In TotalRotationFunction:
- removed unnecessary variables
- improved plot ranges
- added a fitted sigma - seems to make things more precise / less unstable

In ComputeAlignment:
- removed gtol from the call to Perform3StepAlignment
Better alignment process, including hot pixels and simple optmisation.

The two new ideas conceptually are that:
- hot pixels should not be removed for the alignment. The penalty of keeping them
in is small compared with the penalty of taking them out, and then the track looking
for a non-existant hit
- the alignment is so insensitive to the rotation about x and y that it's pointless
to try and do it.
Therefore the alignment now minimises using the TotalDistanceFunction, varying three
parameters (x translation, y translation, z rotation). No iteration is necessary. The
proceedure has been extensively tested on Timepix data. The only 'less-than-ideal' part
is that sometimes (rarely) it struggles to find the correct z rotation angle. This can
be fixed by looking at adjacent runs and putting a starting estimate in by hand.

Code wise:
In ToolBox.py:
- fixed the bug in TotalRotationFunction which is why it wasn't working before. (xx -> xy)
- PerformAlignment now calls TotalDistanceFunction with three parameters to vary

In ComputeAligment.py:
- take out the removal of hot pixels
- remove the iteration, no longer necessary
- instead of Perform3StepAlignment (which is really now 4 steps) just call PerformAlignment
once, and this calls TotalDistanceFunction (once) so all parameters are optimised together.
Merge pull request #28 from sredford/master

Small modifications to alignment procedure