Fix a random crash occurring in calculateProgress method of FPProgressTracker

Hello Liyan.
We had this issue with the FP library crashing on large uploads so I took some time and found the root cause in FPProgressTracker.
I also added two minor fixes.
Please merge these fixes in the library.
Thank you.