Perform safe comparisons on double values

There were a number of places in the code where double values were directly compared using the '==' and '!=' operators. These can result in false nagatives after a value has been round-tripped to the server (20/35 for example).

By using a slightly less precise Double.Epsylon the problem is resolved.