Fixed histogram serialization; also added table-nrows as a generic
function for all tables; only some have methods defined however.