object.h: move some inline functions and defines from cache.h
The object_type() inline function is very tied to the enum object_type
declaration within object.h, and just seemed to make more sense to live
there. That makes S_ISGITLINK and some other defines make sense to go
with it, as well as the create_ce_mode() and canon_mode() inline
functions. Move all these inline functions and defines from cache.h to
object.h.
Signed-off-by: Elijah Newren <newren@gmail.com> Acked-by: Calvin Wan <calvinwan@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>