newton f x1 x2 xacc: using Newton's method, return a root of a
function known to lie between x1 and x2. The root is refined until its
accuracy is += xacc.
The function passed should return a pair containing the value of the function and its derivative, respectively.