Delete perms when deleting a udf

fixes #1131 on github
Merge pull request #1350 from steventlamb/topic/delete_perms_with_udf

Delete perms when deleting a udf