Multitask Learning with No Regret: from Improved Confidence Bounds to Active Learning