interface: T2367: optimize flow and detriplicate add/del_addr functions
interface: T2367: optimize flow and detriplicate add/del_addr functions

- detriplicate list appending
- detriplicate returns
- use if-elif-else
- move check if address is already added to beginning
- move caching in variable to after address assignment so a failed
  assignment won't cache the address

vyos/vyos-1x,vyos/vyos-1x,vyos/vyos-1x,vyos/vyos-1x