Why nationalism is a permanent political force - and how it can be harnessed once again for liberal ends