move fetchKeyValue's quirky bits into fetchKeyedRows(), update test and readme