Fix ghost block and remove matrix_has_ghost()
Remove matrix_key_count() from matrix.h
Merge branch 'ghost_fix'