Ensure streams are closed after parsing

Just read in full contents of XML file up front
such that the stream can be closed. Also switch
from InputStream to Reader since that's the native
format KXml wants anyway (inside setInput() it creates
one from the input stream if it doesn't already have
one)

Change-Id: I69e1602702ac771d29f988169cb7adafefc0198c
2 files changed