Determination of CP and CPT violation parameters in the neutral kaon system using the Bell-Steinberger relation and data from the KLOE experiment