Move to allow foreign military bases in Ecuador fails in vote