improved sqlalchemy test config handling
Set rowcount correctly after retrieving all rows through fetchall or fetchmany

ref #141