Minor bug fixes

- Fix extra spaces after HTML end tags.
- Fix undefined errors in BBM.fn.pruneID()
- Fix line skipping in `<div>` parsing in BBM.fn.parse()
  when div blocks are not closed properly.