Livestatus: Add statehist table.

Fixes #4434