Replace $& with the whole match

Implements the same special replacement patterns as in the [Mozilla Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter).
See this little conversation: https://github.com/adobe/brackets/pull/5840#issuecomment-28124150

Includes Unit tests.