Remove repeated code blocks in ffi-cdecl.lua and fix Makefile dependencies

Make struct, enum and union declarations use the same block of code