Multi-robot coordination and safe learning using barrier certificates