Fix get xy alignment of text

* proper handling of cases with both vertical and horizontal alignment
 (see chapter 17.5.2 Basic Placement Options of pgfmanual)
* improve comments
* add testcase (currently number 97)