Refactored htmlbook:is-chunk and htmlbook:chunk-for-node functions so that they no longer use global params/variables.