Bug 824963 part 1 - Rework arrow positioning and alignment code for arrow panels to be simpler, using the actual anchor/alignment position rather than guessing this from the coordinates, fix centred positioning in rtl, r=neil
Bug 824963 part 2 - Prevent flipping panels when panel is already oriented in the direction to be flipped.  r=enn
Bug 824963 part 3 - add tests for arrow panels.  r=enn.