Compile regexp pattern at connector init

Instead of compiling the connector regexp pattern every time
connector.Refresh() is called, do it only once at connector
initalization — and return an error if it doesn't compile instead of
panic()'ing.
Refactor influxdb connector