Fix new implementation of URLPattern

Fix new implementation of URLPattern:
- Clean double slashes (//) to single (/)
- Detect unreplaced placeholders and throw a missing parameter exception
- Change ActivityStreamURLs so that @ are already encoded to %40