This is more of a response to @Chris. The FLT case is actually useful, in that for many papers of sufficient magnitude, the author will know who the referee is, and even for papers of insufficient magnitude, getting emails saying: hey, I was looking at your preprint, and the proof of lemma x.y.z eludes me is usually a hint. Sending such email through the editor slows down the process by orders of magnitude. The suggestion to be co-author (in my experience) tends to come from the editor, not the referee, and is sufficiently often a bad idea that I think it should never be done (having it come from the authors, as Chris suggests, is a good idea, but has not happened in my experience as author, referee, or editor).
As for the OP's question:
point 2 seems moot: why should the author care that you are the referee. Just write about your great idea, and suggest a joint paper. The author may object that the paper is already submitted, but then saying that you are the referee sounds like blackmail.
point 1: This sort of action seems totally pointless. Both the referee and the author should just take note, and never submit anything to the journal as long as the bad editor is on the board.