Extensions of Picard stacks and their homological interpretation