Updated QgsFields docs, moved some code into .cpp