Fix: parsing of incomplete character entities

Changed the way incomplete character entities are parsed. Strings like "&#" or "&#x" are now left intact in the output. Previous behaviour was that "&#" was parsed as "\0" which resulted in invalid XML character while trying to write an XDocument to string.

Note that I don't have Visual Studio 2008 on my machine, so my fix goes along with upgrade to VS 2010.