Noise analysis of speckle-based x-ray phase-contrast imaging