PLD: filter and sort dataset for table
PLD: abstract functions, closes #112
Merge pull request #114 from onaio/tables-112

Tables 112