opkg: enable -Werror in libopkg and fix resulting build failures