[logos] Only emit class declarations and initializers if the class is required (has hooks or subclasses.)

From: Dustin L. Howett <dustin@howett.net>

git-svn-id: http://svn.howett.net/svn/theos/trunk@633 4410221e-0ddf-4ce3-99c0-2db6c0dbc727