processes plugin: add per-process open files count

Only implemented on Linux for now. On other platforms no value will get
submitted.

Counts the number of files in the /proc/<pid>/fd/ directory.
The function used to count the number of threads has been slightly
modified to work for this case too.