lazy evaluate :class and :extend options when a string is passed

This allows setting class and extend to constants that may not have been required before module definition

Copies ActiveSupport::Inflector#constantize from Rails 3.2.11 commit 1683afb0ae093999d7ca24b87181c4e0109f1f56 activesupport/lib/active_support/inflector/methods.rb line #193