minor changes to the tree app to support a final question and fixing the function registration logic for custom state transitions.
minor changes to the tree app to support a final question and fixing
the function registration logic for custom state transitions.

caktus/rapidsms,dimagi/rapidsms-core-dev,ehealthafrica-ci/rapidsms,lsgunth/rapidsms,dimagi/rapidsms,lsgunth/rapidsms,catalpainternational/rapidsms,caktus/rapidsms,rapidsms/rapidsms-core-dev,catalpainternational/rapidsms,lsgunth/rapidsms,catalpainternational/rapidsms,peterayeni/rapidsms,ken-muturi/rapidsms,unicefuganda/edtrac,rapidsms/rapidsms-core-dev,eHealthAfrica/rapidsms,peterayeni/rapidsms,unicefuganda/edtrac,dimagi/rapidsms-core-dev,peterayeni/rapidsms,peterayeni/rapidsms,catalpainternational/rapidsms,unicefuganda/edtrac,lsgunth/rapidsms,ken-muturi/rapidsms,eHealthAfrica/rapidsms,caktus/rapidsms,ehealthafrica-ci/rapidsms,ken-muturi/rapidsms,ehealthafrica-ci/rapidsms,dimagi/rapidsms,eHealthAfrica/rapidsms