Learning, memory and consolidation mechanisms for behavioral control in hierarchically organized cortico‐basal ganglia systems