From Prithvi Narayan Shah to Balendra Shah, Nepal’s rulers have walked the same tightrope between two giants