Connecting the dots in ethology: applying network theory to understand neural and animal collectives