Small changes + function for getting nid of indiv

Sparql literal escaping function extended.
Added function that gets the node id for an instance URI.