Koopman-von Neumann formulation of classical Yang-Mills theories: I