Assured Autonomy in Multiagent Systems with Safe Learning