Use no-op destroy method on optimized InternalFunctions

Object's destroy method fails on optimized InternalFunction objects,
since they don't have a real PropertyList.