Initial commit.

This commit adds api.h, a C header file that declares the new callback
structure libcallify will provide (on top of libspotify).
Use sp2_ struct instead of sp_.

This was a typo which meant the function expected native libspotify
structs instead of those provided by libcallify.
Return sp_error instead of void.

These wrapper functions should simply return the underlying sp_error
returned by the corresponding libspotify functions.
Use next line braces.

This is consistent with my style and the style I intend on using
throughout the rest of the project.
Add libcallify wrappers for removing callbacks.

This is necessary because internally libcallify will be doing some
tricky stuff to make the callbacks work as intended, and as such we want
to keep track of them and deconstruct them ourselves.

Note that in addition to the standard libspotify remove_callbacks
counterparts, corresponding remove_all_callbacks functions are planned.
Restructure sp2_*_callbacks structs.

Now they use the actual sp_*_callbacks structs as a part of each struct,
as opposed to rewriting them manually in the struct.

This is reasonable because most use cases with libcallify will primarily
be using the sp2_*_callbacks specific fields.

Additionally, this change makes all nested structs pointers to structs.
This is done for efficiency; these structs may not be used, and storing
a NULL pointer instead of an entire NULL struct makes more sense.
Rename api.h to libcallify.h.

For now there is only one external header file, meaning it will probably
be placed in a system include directory (e.g. /usr/include/). Instead of
following libspotify's standard of creating a directory with the single
api.h, we will simply have libcallify.h.
Return int instead of sp_error.

Whether or not these functions use libspotify callbacks internally (and
thus have an sp_error at hand) is an implementation detail.
Ad sp2_session_add_callbacks() implementation.
Remove log() dependency from implementation.

This should be done clientside with whatever logging library they are
using.
Restructure code for ease of reading.
Add a header guard to callbacks.h.
Rework sp2_*_callbacks() prototypes.

Instead of accepting an sp_session, sp_playlistcontainer or sp_playlist,
they simply take the corresponding callbacks struct. Instead, the sp_*
objects have been integrated directly into the corresponding structs.

This is much more convenient from an implementation standpoint;
otherwise, the same thing would essentially be achieved but with manual
memcpy()s and memory management to associate the sp_* object with the
struct by placing it immediately before the struct in the allocated
memory block.

Optionally any of sp_session, sp_playlistcontainer and sp_playlist may
be set to NULL in the structs to make it apply to all of said objects.
This will be very useful in conjunction with automatic playlist
callbacks by way of the nested structs.
Simplify memcpy() call.

Gets rid of some unnecessary parentheses and indentation.
Rename libcallify.h header guard.

Adding the _H is consistent with the other header and my style.
Rename g_callbacks to g_session_callbacks.

This is necessary because there will be different types of callbacks,
each with their own variables.
Simplify and fix adding callbacks.

Before we were trying to use sizeof() to get the size of a malloc()
call, which is of course impossible. Instead we now have another
variable for tracking the amount of callbacks added, which we can
multiply by the sizeof() the struct to get the actual size of the
buffer.
Return 0 at the end of the function.

This prevents a gcc warning and is good practice.
Fix realloc() call.

Before we were mistakenly only passing one argument to realloc(), the
size, but it needs both the size and the pointer to the memory to be
resized.
Use size_t instead of int for n_session_callbacks.

Since n_session_callbacks is storing the amount of session callbacks,
i.e. the size of g_session_callbacks, it is better suited to being
size_t, rather than int.