Magnetism and stability of all primitive stacking patterns in bilayer chromium trihalides