Soliciting pre-submission manuscript comments from people who could later be peer reviewers
I see no problem with refereeing a paper after I've commented on it to the author. I would tell the author what (if anything) I think would improve the paper, and I would tell the editor whether I think it's appropriate for the particular journal and if so then what (if anything) would improve the paper. There have been cases where an editor asked me to referee a paper and wrote, in his cover message, that he knew (because of acknowledgements) that I'd already read the paper, so it should be easy for me to referee.
There are two aspects to this question: what should happen and what actually happens. Soliciting comments on a manuscript is of course perfectly fine and a useful endeavour. As you state problems may arise if persons commenting on the manuscript is asked to review it. Such a person should simply decline to review the paper when requested. It is thus possible that such a person reviews the paper anyway but then the problem is between the reviewer and the editor, that is beyond your reach. What you can do to simplify for an editor is to list persons who have commented on the manuscript. It will then be up to the editor to decide what becomes a breach of objectivity.
If your topic is narrow enough that the number of possible reviewers are limited, you need to consider if you "use up" potential reviewers in the process. Again, I think being open about who has commented on the paper in your correspondence should allow the editor to find good reviewers. Just because you avoid soliciting someone's opinion does not mean the editor will ask that person for a review so assessing such effects is difficult and generalized answers of little use. Knowing the field and potential problems is the only way to assess pros and cons.
In my humble opinion, if there are no conflicts of interest (same university or funding), the referee should inform the editor that is already in contact with the author and let him choose. In any case, consider that many journals require authors to indicate qualified referees and the scientific community is a forum for discussion. In conclusion, be transparent, fair and honest, but do not make choices instead of the publisher.