Use accessor functions to access an iterator's type and direction. This
allows for the possibility of using some other method of determining the
type of iterator than if-chains with bitwise-AND conditions.
Change-Id: I13097aadc08013f7ad6b94723f2d704b4fbd6c20
Signed-off-by: David Howells <dhowells@redhat.com>