Fix PullParser reuse regression

Commit 0424d12f9b8a19c4a451282bc8ae974f6109424d introduced
a regression: calling setInput() would not fully reset the
parser iff the parser had already parsed a <!DOCTYPE
tag.

This change contains a fix and a test.

Thanks to mike@ for the report.

Bug: https://code.google.com/p/android/issues/detail?id=182605
Change-Id: Icddc1c52bca3beaba7f5ee662d18757d6fce6cf2
2 files changed