Make URL patterns to exclude from tracking configurable

* Add unit test coverage for this "exclusion from tracking" logic
* Exclude based on regex match instead of raw string comparison
* Exclude heartbeat requests from tracking
use python's native regular expression caching instead of explicitly pre-compiling