libpcp_web: refactor some /series/query maths functions
libpcp_web: refactor some /series/query maths functions

Refactor the log and floor functions. Also fix an uninitialized
value error in pmseries_log_pmAtomValue(), found by qa/1886.

qa/1886.out needs some careful re-verification (TODO for tomorrow).

adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp