Impact of community mental health services on the adult psychiatric admission through the emergency unit: a 20-year population-based study