This goes into the functions.php file or similar:

//remove auto-links on media
update_option('image_default_link_type','none');