changed workspace parameter convention to always provide workspaceSize, so that size can be explicitly checked. Also, use more enum to make the meaning of some parameters more explicit.
when a function is decribed in hist.h, do not describe it again in hist.c to avoid future doc synchronization issues.
renamed functions with HIST_* prefix