Added a convience function for generated depreciated function messages.

The message will only be displayed to the user if Drupal is configured to show these
warnings, regardless of the setting though it will be logged to the watchdog.