A profile-fitting procedure for analysis of broadened X-ray diffraction peaks. I. Methodology