Added support for internal SVG references & non-alphanumeric fragment identifiers / IDs

Hi Jonathan,

I found (and patched) two issues:

1. The current usage of `x.querySelector()` will possibly fail when you have SVG fragment identifiers (IDs) containing non-alphanumeric characters (which is perfectly legal, e.g. `my~weird~id`). I implemented RegExp based escaping to enable these identifiers.

2. The script utterly failed with a "Syntax Error" when used inside a document that contains **internal SVG references** (e.g. in conjunction with an embedded inline SVG sprite):

```html
<svg viewBox="0 0 48 48">
    <use xlink:href="#internal-id"></use>
</svg>
```

In these cases, the `url_root` is empty, which leads to an invalid XHR request. I implemented an alternative branch for internal references (using `getElementById()`) and created a common replacement method for both internal and external references (the `embed()` function).

I could test my modifications on Win 7 / IE 11 only, but I'm pretty sure they should work elsewhere as well. Also, the modifications would have to be applied to the IE6-8 and minified script versions, but I'd rather leave this up to you.

Cheers,
Joschi