Set up Gmail to work properly with Apple Mail
Besides Google's "official" guide to configure GMail with a desktop client (see Wheat Williams' answer) I think this guide is pretty good and helpful:

http://www.macworld.com/article/157846/2011/03/mailgmail.html

It' a detailed step-by-step guide an features several screenshots.

Regarding the sent messages (your first point):


  "Select the [Gmail] -> Sent Mail subfolder and choose Mailbox -> Use This Mailbox For -> Sent"