Random walks for solving Robin boundary value problems and sampling in a bounded domain