formula: output recommended/optional deps in JSON.
formula: output recommended/optional deps in JSON.

Fixes Homebrew/homebrew#47914 by distinguishing between required, optional, and
recommended dependencies when using `brew info --json=v1`. This is done
by adding the `optional_dependencies` and `recommended_dependencies`
fields to the JSON output.

A good example of this fix is `brew info --json=v1 dtrx`.

Closes Homebrew/homebrew#48196.

Signed-off-by: Mike McQuaid <a17fed27eaa842282862ff7c1b9c8395a26ac320@mikemcquaid.com>

Linuxbrew/brew,reitermarkus/brew,toonetown/homebrew,hanxue/linuxbrew,gordonmcshane/homebrew,EricFromCanada/brew,reelsense/brew,DomT4/brew,palxex/brew,mistydemeo/homebrew,EricFromCanada/brew,muellermartin/dist,mgrimes/brew,konqui/brew,mahori/brew,Linuxbrew/brew,sjackman/homebrew,MikeMcQuaid/brew,MikeMcQuaid/brew,rwhogg/brew,gordonmcshane/homebrew,reitermarkus/brew,sjackman/homebrew,jmsundar/brew,alyssais/brew,ilovezfs/brew,vitorgalvao/brew,nandub/brew,zmwangx/brew,vitorgalvao/brew,Linuxbrew/brew,Homebrew/brew,rwhogg/brew,maxim-belkin/brew,konqui/brew,bfontaine/brew,amar-laksh/brew_sudo,MikeMcQuaid/brew,claui/brew,AnastasiaSulyagina/brew,ilovezfs/brew,DomT4/brew,mahori/brew,tonyg/homebrew,Homebrew/brew,mgrimes/brew,aw1621107/brew,gregory-nisbet/brew,claui/brew,maxim-belkin/brew,hanxue/linuxbrew,mistydemeo/homebrew,JCount/brew,bfontaine/brew,JCount/brew,toonetown/homebrew,jmsundar/brew,nandub/brew,palxex/brew,amar-laksh/brew_sudo,reelsense/brew,aw1621107/brew,nandub/brew,pseudocody/brew,alyssais/brew,JCount/brew,konqui/brew,EricFromCanada/brew,tonyg/homebrew,zmwangx/brew,reitermarkus/brew,gregory-nisbet/brew,gordonmcshane/homebrew,palxex/brew,konqui/brew,Linuxbrew/brew,reelsense/brew,zmwangx/brew,vitorgalvao/brew,staticfloat/brew,pseudocody/brew,Homebrew/brew,reitermarkus/brew,mahori/brew,pseudocody/brew,claui/brew,rwhogg/brew,muellermartin/dist,gregory-nisbet/brew,hanxue/linuxbrew,sjackman/homebrew,bfontaine/brew,alyssais/brew,MikeMcQuaid/brew,mistydemeo/homebrew,JCount/brew,nandub/brew,tonyg/homebrew,sjackman/homebrew,jmsundar/brew,staticfloat/brew,Homebrew/brew,vitorgalvao/brew,DomT4/brew,toonetown/homebrew,aw1621107/brew,mgrimes/brew,claui/brew,mahori/brew,amar-laksh/brew_sudo,muellermartin/dist,maxim-belkin/brew,staticfloat/brew,AnastasiaSulyagina/brew,DomT4/brew,AnastasiaSulyagina/brew,EricFromCanada/brew,ilovezfs/brew