DENVER — Two heartland states filed the first major court challenge to marijuana legalization on Thursday, saying that Colorado’s growing array of state-regulated recreational marijuana shops was piping marijuana into neighboring states and should be shut down.