Improve HAF upgrade script
- verify that after upgrade all C language sql functions reference current commit
- before upgrade check that none of user tables/views use HAF data type as its column type
- bring back
drop function
for sql functions that were removed, but were present at some point
Closes #179 (closed)