[RFC] Implement startuptime functions on top of profiling functions

Another notch in the belt of reducing our dependence on `gettimeofday`, which is not present on Windows. It's also a nice cleanup.

Ping @equalsraf.

Ref: #784, #810, #696.

**NOTE**: for reviewers, travis is not actually compiling the new implementations of the `time_*` functions because one needs to define `STARTUPTIME` for that. We could contemplate taking the `#ifdef's` out of `profile.c` so these functions are always compiled in (and probably left out when using `-flto` and compiling as an executable).

To compile:

```bash
$ make CFLAGS='-DSTARTUPTIME -DNDEBUG' DEBUG=0
# or: full speed ahead!
$ make CFLAGS='-DSTARTUPTIME -DNDEBUG -flto -march=native' CMAKE_EXTRA_FLAGS='-DCMAKE_BUILD_TYPE=MinSizeRel' DEBUG=0 VERBOSE=1
```

To compare with neovim before I did the changes, I did:

```bash
#!/bin/bash

BASE="$HOME/experiments/neovim/profile-cmp"

NVIM_OLD="$BASE/nvim_old.log"
NVIM_NEW="$BASE/nvim_new.log"
# EXTRA="-u NONE"

>| "$NVIM_OLD"
>| "$NVIM_NEW"
~/github/aktau/neovim-startuptime-before/build/bin/nvim $EXTRA --startuptime "$NVIM_OLD" -c quit
~/github/aktau/neovim/build/bin/nvim $EXTRA --startuptime "$NVIM_NEW" -c quit

sdiff "$NVIM_OLD" "$NVIM_NEW"
```
Fixes pushed.


On Fri, Jul 18, 2014 at 5:31 PM, oni-link <notifications@github.com> wrote:

> In src/nvim/main.c:
>
> >      if (STRICMP(paramp->argv[i], "--startuptime") == 0 && i + 1 < paramp->argc) {
> >        time_fd = mch_fopen(paramp->argv[i + 1], "a");
> > -      TIME_MSG("--- VIM STARTING ---");
> > +      time_start("--- VIM STARTING ---");
>
> VIM -> NEOVIM/NVIM?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/neovim/neovim/pull/962/files#r15117200>.
>