added addtick function wrapper

to deal with error handling
misc bug fixes
abstracted kdb upserts with function interface
added kdb service scripts
moved kdb function interface into q script
enhancement / fixes on kdb function interface

. moved etc/q.q to cfg/dbstore.q
. integrated more kdb fumction calls
. added unit test.
. split tick and hist db disk locations