Differential dynamic microscopy to characterize Brownian motion and bacteria motility