Fix this.rows.length issue in select_all and invert_selection

Please see http://trac.roundcube.net/ticket/1489359 for details.