Fix issue with styleArrow and cleanup position and attach code:

* Don't attach in createGuider(), since we're going to do so in show()
anyway.
* Convert string position to numeric position as early as possible,
createGuider and (since the latter is also public) getFlippedPosition.
* Fix incorrect behavior when 0 passed to getFlippedPosition.
* Minor code cleanup.

Change-Id: Icf53c4e06f50f9c3765ee13b5e45bc03fc30ee0b