Pelosi mulls future after Republicans win House