Renamed some functions

Gave some functions more hierarchical names:
* bon_w_begin_FOO -> bon_w_FOO_begin
* bon_w_end_FOO -> bon_w_FOO_end
* bon_w_open_doc -> bon_w_open
* bon_w_close_doc -> bon_w_close