BMA representative wins legal dispute over attempts to silence him about conditions in armed forces