Optimize the procedure of intersection detection by check polygon's bounds(box) first to exclude the ones that stay far apart.

Signed-off-by: RyeYao <rye.y.cn@gmail.com>