Add "count" parameter to Items::createItem
and update the "createitem" plugin to specify it instead of creating a bunch of individual items in a loop.
Fixes #5481.
I did not modify modtools/create-item, since it already has its own workaround code for handling item stacks (and it should continue to work as-is).
This appears to have broken modtools/create-item, despite my efforts to maintain compatibility: apparently, luaL_optint(state, 7, 1) returns zero when the parameter is absent, rather than returning 1 like I was expecting.
Numerous other functions are also using luaL_optint and are presumably expecting similar behavior, so we might need to review this in general, but for now I've pushed a workaround which appears to work correctly.