The court may, at any time before judgment, upon a plea of guilty, permit it to be withdrawn, and a plea of not guilty substituted.
R.L.1910, § 5804.