Algebraic weaves and braid varieties