Optical detection for droplet size control in microfluidic droplet-based analysis systems