Refactored and enhanced table order support:
- Rewrote sorting function, it was really quite buggy.
- Added reorderFontTables() functions, which reorders the
  tables in a font at the sfnt level.
- TTFont.save() will now by default rewrite the font in the
  optimized order. This is done through a temp file since
  our dependency checking logic gets in the way of writing
  the tables in a predefined order directly (if table A depends
  on B, table B will always be compiled and written first, so
  this prevents A from showing up in the file before B).

sfnt.py:
- removed closeStream option from SFNTWriter.close(); it's better
  done by the caller (TTFont).


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@475 4cde692c-a291-49d1-8350-778aa11640f8
diff --git a/Lib/fontTools/ttLib/sfnt.py b/Lib/fontTools/ttLib/sfnt.py
index 0ce0ca0..e94a516 100644
--- a/Lib/fontTools/ttLib/sfnt.py
+++ b/Lib/fontTools/ttLib/sfnt.py
@@ -116,7 +116,7 @@
 			entry.checkSum = calcChecksum(data)
 		self.tables[tag] = entry
 	
-	def close(self, closeStream=1):
+	def close(self):
 		"""All tables must have been written to disk. Now write the
 		directory.
 		"""
@@ -138,8 +138,6 @@
 			self.calcMasterChecksum(directory)
 		self.file.seek(0)
 		self.file.write(directory)
-		if closeStream:
-			self.file.close()
 	
 	def calcMasterChecksum(self, directory):
 		# calculate checkSumAdjustment