Docker is not an API around LXC. Any more than any application using a framework is a wrapper around said framework.
However, the analogy I just made is only at a point in time. LXC is not the only Linux provider to manage cgroups/namespaces, it was just the most convenient at the time for the target audience. That is a fleeting position soon remedied.
If you'd like to know more, I'd encourage you to get involved with Docker development.
also, its not really docker doing that, its LXC. Docker is an API around it.