filter: split filter functions, add persistent

If filters begin with persistent:, then the following protocol is used:

  * The filters start with no arguments in main()s argv. The filter
    SIGSTOPs itself after setting up handlers.
  * Upon receiving SIGCONT, the filter will read a new line of
    data for each argument it expects.
  * After reading such arguments, all subsequent lines it receives will
    be considered normal data to be filtered and written back out to
    stdout, per the normal mode of operation.
  * Upon receiving SIGUSR1, it should expect no new lines of data for
    the current operation. When it is done processing its most recent
    line of data, it should send SIGSTOP to itself.

On the parent side, the picture looks like this:

  * It starts the filter process, waits for it to SIGSTOP itself,
    gives it stdin and stdout, sends SIGCONT, and writes arguments
    to the filter process line by line.
  * When the filter is "closed", it sends SIGUSR1, and then waits for
    the process to stop using WUNTRACED.
  * When cgit is tearing itself down after the webpage has completely
    rendered, all filters that are SIGSTOPd are sent SIGKILL.

This design allows us to avoid expensive fork() and exec() for
repetitive filters, such as the upcoming email filter.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
filter: add support for email filter

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
filters: add simple gravatar email filter

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>