This commit introduces intruduces a small helper class that wraps any writer and provides a flush operation that performs the corresponding action if the writer is an AsyncJsonWriter and does nothing otherwise.
{host,service}::StateTypeToString()
StateTypeFromString()