My Bible study youth-leader always used to tell us, "If you have to ask, then it's probably too far." I hated that answer, we all did. But, being married for ten years now, I can say that she was dead RIGHT.
If you've got doubt about your actions, then that's your first red flag.
People can argue Biblical text on this issue until they are blue in the face. What you are referring to above was referred to as Onanism (spilling one's own seed) in the Old Testament and was frowned upon ... not for the same reasons as today. Back then it was considered a waste, if you will, and a disgraceful type of birth control. My point is that the historical/technical answers are irrelevant. The irrelevance does, in fact, give Christians clues. It tells us that things of that nature were more cultural taboos than doctrine.
I know a couple of people who have gotten caught up in the technicality of the act, and done things before marriage that they would never do inside of marriage, just to side step the traditional act. That makes me sad, and it makes them sad too, believe me, it is one of their major life regrets.
Jesus taught more about what was in our hearts and minds, on this issue, than what we do with our bodies. Maybe self pleasure is a tool for some Christian singles to avoid going too far before marriage, maybe for some it is a tool of temptation for further things. It's important not to judge, and to keep open lines of communication with God, as only He can see what is on our hearts.