Add interpolateName function and documentation

Extracted interpolation code from `file-loader` and enhanced it with regular expression support.
Could implement the syntax @diurnalist proposed for `[hash]`? Which allows to provide a hash length. You can add a syntax for digest type and hash type.

```
[hash] full length hash
[hash:5] hash with length of 5 chars
[hash:base52:6] hash with length of 6 chars (encodin in base52)
[md5:hash:base52:10] md5 hash with length of 10 chars (encodin in base52)
```

some reference: https://github.com/webpack/webpack/blob/master/lib/TemplatedPathPlugin.js#L6

Make the hash function available for use: `function getHashDigest(buffer, hashType, digestType, maxLength)`. We could use it in webpack in the `TemplatedPathPlugin` (@diurnalist).