The size and shape of the Milky Way disc and halo from M-type brown dwarfs in the BoRG survey