return 0 bytes if HttpResponse entity is null

When the target http server answers with 0 bytes of content as it happens
often with non-GET operations, if the underlying stack is HttpClient, the
response entity can be null. This is documented on
http://developer.android.com/reference/org/apache/http/HttpEntity.html :

"An entity that can be sent or received with an HTTP message. Entities can be
found in some requests and in responses, where they are optional."

If the associated entity is null, we assume the data has 0 bytes of content
and thus avoid a NullPointerException on
BasicNetwork#entityToBytes(HttpEntity entity)