How can I stop civicrm_metatag_metatags_view_alter() altering non-CiviCRM URLs
I'd recommend a check to test that the Drupal path (eg current_path()) commences with civicrm. This is untested, but I think you want something like the following -

/**
 * Alter metatags before being cached.
 *
 * This hook is invoked prior to the meta tags for a given page are cached.
 *
 * @param array $output
 *   Metatags to be displayed.
 * @param string $instance
 *  Context.
 */
function civicrm_metatag_metatags_view_alter(&amp;$output, $instance) {
  if (arg(0) == 'civicrm') {
    $linkUrls = array('og:url', 'canonical', 'shortlink');
    foreach ($linkUrls as $url) {
      if (isset($output[$url]['#attached']['drupal_add_html_head'][0][0]['#value'])) {
        $output[$url]['#attached']['drupal_add_html_head'][0][0]['#value'] .= _civicrm_get_url_parameters_as_url_string();
      }
    }  
  }
}



hook_metatag_metatags_view_alter()
civicrm_metatag_metatags_view_alter()


I don't really like the look of the fixed [0][0] in that code either?

If you're submitting a fix, you should check out CRM-16495: Metatag canonicals are broken, q is multiplied which looks like it fixes the error message you're experiencing also. That fix is committed to 4.7 now.

I think your proposed solution is correct, CiviCRM shouldn't be messing with metatags if it hasn't been involved in the page generation.