A former mayor of Shrewsbury has resigned from the Labour Party following claims he had shared anti-Semitic posts on social media.