Russia's former president Dmitry Medvedev has issued fresh nuclear threats against NATO and Ukraine.