Fixes #5907 moves deprecation code to elgg_register_widget_type()