elgg_sanitize_view_type function

A single place to check whether a view type is valid, which in turn is
referenced when a viewtype is retrieved or a view is called.

Refs #4511