Fix static arrays pass-by-value bug and cleanup b2collidepolygon.