Spin dynamics, short-range order, and spin freezing in Y0.5Ca0.5BaCo4O7