Refactored test_shift to get_pi_shift, added tests

The previous get_pi_shift has been updated to recognise
arguments of form `theta + n*pi/12`. It returns `theta`, `n`
and a boolean to confirm if the given argument matches the pattern

Quite a few tests have been added to check consistency of the new
version of the function.

The previous occurences of get_pi_shift have been updated
to the new function definition.