A rare polar bear that was spotted outside a cottage in a remote village in Iceland was shot by police after being considered a threat, authorities said.