Improve base provider

Speed improvements to the `BaseProvider` by pre-compiling the regular expressions and using `random.choice` to select from a sequence. Also applied PEP8 rules (using `pep8` v1.5.7).