Modeling of open quantum dots and wave billiards using imaginary potentials for the source and the sink