generalize things to support other account types

* use a pattern to locate folders for accounts instead of a hard-coded list
* don't repeat the same code to add mailboxes of different types

close #307
override the default sender if the recipient domain matches an account
support sandboxed versions of Mail

Now we know why the prefs were renamed in ~/Library. That file is no
longer used. This should refer to the actual prefs for both sandboxed
and legacy versions of Mail.
mutable copies need to be released
remove garbage from the password buffer
bump version to 3.0.1
details are hard-coded now
check yet another place for preferences
make sure we use a valid accountIndex if sender was nil
check all recipients for a matching domain
if no valid sender can be found, stop sending
Merge pull request #2 from skurfer/master

small fixes