Added local R to update

Added R as an optional parameter to update(). Got rid of the xp and Pp
in favor of using x and P in both update and predict. This allows
us to call predict() more than once in a row.