Make BgpProtoPrefix parsing more robust

Change-Id: I7e0cfd09e7f4e8e3f0315fd4439de898c584fb11