Do not fetch external parameter entities

Unless explicitely asked for when validating or replacing entities
with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com>
Avoid Double Null Check

Cleanup
For https://bugzilla.gnome.org/show_bug.cgi?id=729851
Avoid Possible null pointer dereference in memory debug mode

Fix a use before check on pointer
For https://bugzilla.gnome.org/show_bug.cgi?id=729849