Salmond resigns following Scottish independence defeat