Add option to pass pid function to process collector

In order to allow clients to export metrics for another process (for
example in an exporter example like haproxy_exporter collecting metrics
about running haproxy instancs), this change set adds the option to pass
a pid function instead of a single integer. Therefore, clients can pass
a differen pid after a restart of the monitored service.