bitwriter: Fix the trailing bits lost when getting its data.
In reset_and_get_data and reset_and_get_buffer, it fails to include the trailing bits less than 8. So, when the bit_size is not byte aligned, the trailing bits are lost in the return buffer.