Open the Script Editor, and create a script with these two lines:
tell application "iPhoto" to quit
tell application "iTunes" to quit
Save this as an application (I called it Quit iTunes and iPhoto, and stored it in the Applications folder). Command-option drag this app to the Switch-Out Items folder to create an alias. For each user who shares iTunes and/or iPhoto, install WinSwitch and create a similar alias.
Click on the alias, and get info (Command-I). Under Ownership and Permissions, open the Details tab and change Group access to Read Only. This is necessary since the first hint mentioned above (if you use it) gives group write access by default, and WinSwitch, for security reasons, refuses to run anything with write access for anyone but owner.
Now, whenever you switch to another user using the WinSwitch dialog, iTunes and iPhoto will exit, and the next user will have no troubles.

