Move some duplicate code, related to breakpoints, that was in both backends into a single place. This is in preparation to solve issue #844 (conditional breakpoints make step and next fail) which will make this common breakpoint code more complicated.