LayoutParams casting issue when recycling state

If the StaggeredGridView has a headerview but no content there will a casting exception when casting
AbsListView.LayoutParams to StaggeredGridView.LayoutParams. This patch set confirms that the params
are an instance of StaggeredGridView.LayoutParams before proceeding.