SwXTextPortionEnumeration ctor: avoid dynamic_cast in the common case

For a document of 1000 pages and with 1000 bookmarks, this brings a
considerable speedup on ODF export:

before:
real    3m28.187s
after:
real    2m51.565s

Change-Id: Ic3f85c727a8ea4b5012d5c3f0a5887ff47762fb8