Stability of relativistic Bondi accretion in Schwarzschild-(anti-)de Sitter spacetimes