Fixes #5907 moves deprecation code to elgg_register_widget_type()

fixed spacing
Merge pull request #6090 from cash/widget_deprec

Fixes #5907 moves deprecation code to elgg_register_widget_type()