Refactoring libcontainer to avoid cyclic dependencies in the future.

This change will make future work inside libcontainer easier since the API is separated from the internal implementation.
Ref:

```go
package main

import "fmt"

type Test struct {
        Device string `json:"device"`
}

type Other Test

func printTest(t *Test) {
        fmt.Println(t)
}

func main() {
        o := &Other{Device: "test"}

        fmt.Println(o)

        printTest((*Test)(o))
}
```