Remap caps lock to escape in OS X
Solution 1:
There's a Preference Pane called PCKeyboardHack that lets you remap keys based on a keycode. Remap Caps Lock to keycode 53 (the escape key).
Given that PCKeyboardHack works at the driver level, it works system-wide. I installed it and tried it myself, and it did what I think you want (when I press the key labelled 'Caps Lock', the action that would normally be triggered by pressing the Escape key is performed).