Energy distribution and equation of state of the early Universe: Matching the end of inflation and the onset of radiation domination