Pub landlords to get ‘fairer deal’ under new code of practice