I had similar problems with a pic16f876.
The fastest way to determine if it's the pot would be to ignore the pot and hard code a PWM width. It your PWM is stable, it's the pot.
Also, the pic16f876 datasheet clearly states that the maximum resistance for the A/D inputs is 2.5K ohm. I imagine your pic has the same limit.
The maximum impedance for the PIC16F1788 A/D inputs is 10Kohm; see section 17.4 of the datasheet. I assumed it was the same for all of them, but I just double checked the datasheet for the 16F87X and that does indeed say 2.5K.
I guess that just serves as a reminder to always check the datasheet.
A 10k pot gives a maximum 2.5k impedance, so you should be ok. The impedance requirements are important to meet the accuracy spec. in the datasheet, a higher impedance will still work but leakage and S&H currents will degrade accuracy.
In terms of your code:
1) Why are you reconfiguring the CCP peripherals every single time you update the duty cycle? This simply isn't required, and could well be causing problems. Additionaly, do you really need to calculate PR2 value at run time, and especially every time you update the duty cycle? Does your PWM frequency have to change regularly?
2) Why are you using floating point? This will bloat your code and incur a hefty execution time penalty. There is rarely any need to use floating point math in simple functions like this.