Monolayer and bilayer PtCl$_3$: Energetics, magnetism, and band topology