[server] fix generate_source_config regression on python2
lgc outputs "str" objects on python2 and python3, so we can't just use
io.StringIO (which expects unicode objects).
Fixes: c36cda9074c5
usr/lib/python2*/*-packages/cubicweb/server/
usr/lib/python2*/*-packages/cubicweb/hooks/
usr/lib/python2*/*-packages/cubicweb/sobjects/
usr/lib/python2*/*-packages/cubicweb/schemas/
usr/share/cubicweb/migration/