Formation of Bubbles and Droplets in Microfluidic Systems