MIME multipart/form-data: added method to calculate the content length of a multipart entity. This method buffers only small amount of data in memory in order to determine the total