A complete classification of hereditarily equivalent plane continua