Fix MetaData writer
Fix MetaData writer

- AddModule() is called after all type defs and member defs have been
  initialized.
- AddImplementation() is called when creating manifest resource rows
- AddCustomAttribute() calls Error() if ca is null
- Don't call AddAssembly() if module.Assembly is null

0xd4d/dnlib,Arthur2e5/dnlib,modulexcite/dnlib,kiootic/dnlib,picrap/dnlib,ilkerhalil/dnlib,jorik041/dnlib,yck1509/dnlib,ZixiangBoy/dnlib