Use C.GoBytes instead of C.memcpy

I noticed that there was memcpy used a few times where C.GoBytes was more
appropriate.

Also remoted a few unnecessary unsafe.Pointer casts.

Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>
Merge pull request #81 from tchap/use-cgo-calls

Use C.GoBytes instead of C.memcpy