Factor our name/public name handling
Factor our name/public name handling

This kind of handling will be useful for the toplevel stanza and the upcoming
c_executables stanza.

Signed-off-by: Rudi Grinberg <4c46c202a3b8207ad5740134b125aae40c6c67a8@gmail.com>

dra27/jbuilder,janestreet/jbuilder,janestreet/jbuilder,janestreet/jbuilder,dra27/jbuilder,dra27/jbuilder,janestreet/jbuilder,dra27/jbuilder,janestreet/jbuilder,dra27/jbuilder,janestreet/jbuilder,dra27/jbuilder