TrustJudge: Inconsistencies of LLM-as-a-Judge and How to Alleviate Them