Correct parameters passed to emit_cbv_metadata and make related warnings to errors
This was probably a rebase error, but since the compiler only warns about it (C couch), nobody seems to have noted. For that reason I've added a patch that changes two related warnings into errors.