Improve efficiency of encoding detection in Source::Buffer

As you conjectured the use of a regexp yields better performance. 

This fixes #39.