Avoid manual realloc, use comphelper::SequenceAsVector instead

Change-Id: I26c6bcf7361bbb787fcb4133d05b0a668fd72d01