The $K$-theory spectrum of varieties