Added tests for abcd_normalize
See #1973.
Rewritten function abcd_normalize, closes #1973
Code is notably simplified, at the cost of not showing specific
error messages for each shape mismatch. That is easy to fix, but
I wanted to leave this state here.
Fixed several corner cases
Improved error message for bad input array shapes
Merge pull request #2756 from Juanlu001/fix-1973

Rewritten abcd_normalize, fix 1973