bgp: fix logic for checking BGP capability

BGPOpen that is set to sent_open_msg and recv_open_msg doesn't have
caps and BGP capabilities are stored in opt_param as List.
I changed the way of checking BGP capabilities.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>