Microfluidic based system for purification and extraction of target molecules