A U.S. judge on Tuesday dismissed a lawsuit in which the founder of WallStreetBets, which helped ignite investors’ fascination with “meme” stocks, accused Reddit of wrongly banning him from moderating the community and usurping his trademark rights.