console: do not capture local variables by reference

I am seeing intermittent crashes while running "make check" that appears
to come from serial input initialization. I and Nadav reviewed relevant
code and found two places where local (on stack) variable is captured by
refference by lambda expression. The patch fixes both of the. In on of the
cases lambda is not needed at all. This seam to be fixing the crash.

Signed-off-by: Gleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>