Support encoding values of pointers, including nil -> NULL

At the moment `pg` cannot encode pointer values, so the following example panics:
```
    rec := &struct{                                                                                                                                                                   
        Id int                                                                                                                                                                        
        X *int       // perhaps we desire to insert NULLs sometimes                                                                                                                                                                 
    }{1, new(int)}                                                                                                                                                                    
    *rec.X = 1138                                                                                                                                                                     
    db.Exec("INSERT INTO test (id, x) VALUES (?id, ?x)", rec)  
```
This pull request fixes this problem.