Set fin bit only for the terminating fragmented frame

Expected behavior:
	'Ref RFC 6455'
	A fragmented message consists of a single frame with the FIN bit
	clear and an opcode other than 0, followed by zero or more frames
	with the FIN bit clear and the opcode set to 0, and terminated by
	a single frame with the FIN bit set and an opcode of 0
Current Behavior:
	When server sends data in fragmented frames,
	for some platforms, the data received is not always equal to the payload length
	and hence the original frame is received in multiple receives due to which the
	final bit is set even if the received fragmented subframe is not the
	terminating one.
	Consider if server sends the terminating frame of size 1008 bytes with final bit set.
	On client side, it further gets divided into two chunks of size 532 bytes
	and 476 bytes. For both the frames the final bit is set which violates the
	protocol.
	This behavior is observed as the final bit value received from server is
	directly assigned to the client side frame without checking if thats the
	terminating frame or not.
Set opcode bit only for the first fragmented frame

Expected behavior:
        'Ref RFC 6455'
        A fragmented message consists of a single frame with the FIN bit
        clear and an opcode other than 0, followed by zero or more frames
        with the FIN bit clear and the opcode set to 0, and terminated by
        a single frame with the FIN bit set and an opcode of 0
Current Behavior:
        When server sends data in fragmented frames,
        for some platforms, the data received is not always equal to the payload
	length and hence the original frame is received in multiple receives due to
	which the opcode bit is set even if the received fragmented subframe is not
	the first one.
        Consider if server sends the first frame of size 1008 bytes with opcode bit set.
        On client side, it further gets divided into two chunks of size 532 bytes
        and 476 bytes. For both the frames the opcode is set which violates the
	protocol.
	This behavior is observed as the opcode bit value received from server is
        directly assigned to the client side frame without checking if thats the
        first frame or not.

Signed-off-by: Nikita Nerkar <nikitan@marvell.com>
Merge pull request #6 from nikita-n/master

Pull request from nikita-n's fork