SERVER-8182 getLog returns truncated lines when logUserIds=1

Make sure that appendServerExtraLogContext does not append NULL to BufBuilder.