[doc] describe config file search sequence in manpage
[conf] validate config variable “formats”

Adds a validation function that checks whether the value is indeed a
list of comma-separated identifiers. Also, duplicate and invalid entries
are dropped from the result.