I like this idea to build new features into Safari. What about cookies? Omniweb has a great way to handle them, but it is Beta and unstable. Safari already has a Preference to "Accept Cookies: Never," but I still have to control cookies by hand.
All that is needed are two tweaks: (1) Always allow such as *apple.com; and (2) Always allow and Dump at end of session domains such as *yahoo.com (for mail).
I'm no programmer, but I think an app. for developers, "SIMBL" already makes modifying Preferences easy. I use Saft and Pithhelmet which use that. Maybe that would help.