Moscow has threatened "necessary measures" after a major nation voted to host allied warheads and offered to foot the bill for a permanent US military base.