plugins: add type strictness to plugin descriptor macros
i.e. check the type of the values provided, rather than just blindly casting, and thus allow mistakes to get caught with compilation errors.
i once lost some hours tracking down the cause of a crash that this type strictness would have prevented.
also, the third commit statically checks that the length of choice list item and label arrays are identical. [Moved to separate MR !333 (closed)]
Edited by Lyndon Brown