extract cache handling to erlide_cache.erl
simplify erlide_cache api
fix some type specs