I use gmail for email hosting but it all routes through a domain I control, so if Google one day goes crazy, I can switch out of gmail. (And IMAP is well understood so I could also copy it off), whereas things like my facebook friends are much harder to migrate.
It's probably a good idea to start those backups now with something like offlineimap. You don't want to wait until Google 'goes crazy' or your account is randomly suspended.
Just in general, the backup strategy of storing things in at least two places is the only way to go, and simply knowing in the abstract that I could backup my data if I so chose is meaningless. Make a cron job, sync your home directory, whatever floats your boat, just do it.
(I work at Google, and I am consistently surprised by the amount of effort people put into portability. I think this is important and underappreciated)
That said SquirrelMail, Horde and RoundCube are all open-source webmail apps off the top of my head. RoundCube being the AJAX-y Gmail-ish one.