Taking header margins into account

Hi there,

First, a big thanks for this great library, it's exactly what I was looking for.

If I'm not mistaken, header margins are not considered. When I started using it, I set my header XML to this:

```xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >
        
        <TextView
            android:id="@+id/header"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="5dp"
            android:layout_marginBottom="10dp"
            android:layout_marginTop="10dp"
            android:background="#333"
            android:text="Large Text"
            android:textColor="#FFFFFF"
            android:textSize="10sp" />
    </LinearLayout>
```

Basically a black rectangle with text. But I wanted it to be separated from the rest of the `ListView` elements, so I put some margins, because padding didn't do the trick. Then I noticed that I could see the elements scrolling behind my header, in the little gap left on top of it and when scrolling up there was a jump when changing header.

I'm new to Android, but I wanted to fix this myself, so maybe the patch is not the best thing ever, but please orientate me on how to rebase it so that it passes quality standards and can be merged. I would really like to see my first Android patch merged upstream :)

There are several easy improvements I haven't done, because I wasn't sure if the patch would make it in:
* For example the way I'm calculating header margins is mistaken and maybe makes more sense that header margins are provided as an argument. Also I'm not sure if other layouts can be cast to `LinearLayout.LayoutParameters`.
* If no margins are present, some of the calculations that are done now could be skipped or simplified, that is quite an easy fix.
* Maybe the way I'm avoiding reusing first header or trimming its top margin isn't also great code either.

So please, let me know what you think and what your feedback is.

Thanks, cheers
Miguel