Algebraic renormalization of the BF Yang-Mills theory