A subdivision algorithm to reason on high-degree polynomial constraints over finite domains