Italian PM resigns after losing constitutional referendum