Plug leaks in bsp_build() and bsp_clip()

**This PR Targets #43**

`bsp_build` and `bsp_clip` leak memory through their helpers. `_build` because it loses track of polygons that are split, and discards them and `_clip` in the opposite way, where created polygons (by `poly_split`) that are clipped are not accounted for, and leaked where the entire input set is reliably deallocated. 

This PR attempts to address those problems:

  * [x] Plug `bsp_build_*` by tracking unused polygons, and freeing them when `copy` is true
  * [x] Plug `bsp_clip_*` by tracking created polygons, and freeing them when unused

There is also an ugly problem where `bsp_clip_polygons` and `bsp_clip_polygon_array` are almost identical, with a few differences in iteration and counting. This is *also* terrible:

  * [ ] DRY `bsp_clip_polygons` and `bsp_clip_polygon_array` https://github.com/sshirokov/csgtool/issues/45

### Note

Here, we start changing some signature. So the promises in #43 about being "API compatible" are wrong.