Checking for system-type is not enough accurate, it broke when using
an X server under OS X because system-type is darwin but the
initialized display is x-initialized not ns-initialized.
Add macro to wrap things that depend on the display being
initialized (and a frame active), such as getting the font. Advise the
`server-create-window-system-frame` function which is called by
emacsclient when creating a window-system frame. This is only run the
first time a frame is created, so the advice removes itself.
Fixes: syl20bnr/spacemacs#299 and syl20bnr/spacemacs#1894
(Among others)