Solving Infinite-Domain CSPs Using the Patchwork Property