NSW police detective Gary Jubelin resigns