First step in replacing NS_IMAGE with NS_FILE, to match the canonical name change (bug 44).
This step simply defines the new constants NS_FILE and NS_FILE_TALK, retaining NS_IMAGE and NS_IMAGE_TALK as aliases, and makes them usable for export (which seems to be the only part of core that uses the NS_* names as strings).
The second step should be a global search-and-replace across core (other than Defines.php and Export.php). I've already tried this locally, and there seem to be no problems. This step should not touch extensions.
The third, optional step would be updating at least some extensions to use the new constant names as well. This would generally require prepending the following compatibility snippet to the main extension file:
// The names NS_FILE and NS_FILE_TALK are new in MediaWiki v1.14
if( !defined('NS_FILE') || !defined('NS_FILE_TALK') ) {
define('NS_FILE', NS_IMAGE);
define('NS_FILE_TALK', NS_IMAGE_TALK);
}