JEDI-net: a jet identification algorithm based on interaction networks