Fix semicolon insertion to really work buffer-locally.

The advice affected all comint buffers, because local-set-key is
actually local to a major mode. A copy of the keymap must be used in
order to really make this work buffer-locally.