TrustAgent: Towards Safe and Trustworthy LLM-based Agents through Agent Constitution