Self-assembled monolayers of electroactive molecules for the preparation of memory devices