[api] Add optional `filter` param to `director.Router#traverse`
[api] Add optional `filter` param to `director.Router#traverse`

`filter` param filters routes and `after` functions, rejecting whatever
function/route the filter returns `false`.

webx32/director,meleslilijing/director,pocketjoso/director,GerHobbelt/director,stonegithubs/director,pocketjoso/director,tanzhihang/director,pandoraui/director,andradedev/director,webx32/director,flatiron/director,lzhengms/director,sheldonzf/director,tanzhihang/director,mylikes/director,lzhengms/director,andradedev/director,meleslilijing/director,fadeit/director,stonegithubs/director,cpg1111/director,maxogden/director,mylikes/director,cpg1111/director,ks3dev/director,fadeit/director,GerHobbelt/director,vitalsource/director,sheldonzf/director,kiritoe/director,vitalsource/director,kiritoe/director,ks3dev/director,pandoraui/director