Improve `String.prototype.contains` polyfill

This patch replaces the old `String.prototype.contains` polyfill with http://mths.be/contains, while also adding the tests from that project.