search: factorize max results sanitation, allow max specified from ui

Change-Id: I066369829816189dbd2f682ce003c8b82022d131
Allow HTTPS with a self-signed certificate.

A new client configuration parameter, "trustedCerts" (list of strings)
is introduced. A certificate fingerprint is defined as the 10 digits
prefix of the sha1 of the whole certificate (in ASN1. DER form).
trustedCerts should contain the list of fingerprints of the
certificates we trust. If not empty, the server's certificate
is checked against that list, instead of using the full x509 validation
on it.

-added a dial function and tls configuration, which check if we're using
SSL, and if we're in "trustedCerts" mode.
pkg/client/client.go
pkg/client/config.go

-moved android specific hacks from camput to the client layer, so that
the dial and tls config could reuse/access them. Also allows future
reuse for other commands, such as camget.
pkg/client/android.go

-adapted camput to the above changes:
cmd/camput/android.go
cmd/camput/camput.go
cmd/camput/files.go

-server prints a hint when it generates the self-signed:
pkg/misc/misc.go
server/camlistored/camlistored.go

-camliactivity:
clients/android/res/xml/preferences.xml
clients/android/src/org/camlistore/Preferences.java
clients/android/src/org/camlistore/SettingsActivity.java
clients/android/src/org/camlistore/UploadService.java
clients/android/src/org/camlistore/UploadThread.java

http://camlistore.org/issue/131

Change-Id: I6be20161549a69aafc8eb7b9e96e9351dc1c5b09
camput: refactor; break up uploadNodeRegularFile

Change-Id: Ifde8f1a249eb4831757a09ea0ac881b049a90525
search: refactor serveEdgesTo with annotated structs

http://camlistore.org/issue/99

Change-Id: I84ed551db4fecbd1ca06d76759d7512d1651bbf2
Merge "search: factorize max results sanitation, allow max specified from ui"
Merge "camput: refactor; break up uploadNodeRegularFile"
Merge "Allow HTTPS with a self-signed certificate."
client: fix "method not an expression" error for Go1

Change-Id: Id46cfafb6585fb074415d10affbb835373d27112
camput: reenable -secret-keyring, use flag.StringVar

http://camlistore.org/issue/76

Change-Id: I37229a1082e5d955cadcc63521ea1b13dd63a33c
Merge "camput: reenable -secret-keyring, use flag.StringVar"
camput: sqlite backend for have cache and stat cache

http://camlistore.org/issue/73

Change-Id: Id6fb95f1980139f2b525321a7e1b553cb11fe727
newui: index.html free of camli.js

All the deps needed from camli.js have moved into
server_connection.js, closure style.

Change-Id: Ic04847f428fdc983f660c12ae32fc75c80767438
newui: permanode page

Change-Id: I3f2c5b54de2a43d5a53b1a31d7ecbf4b70afb6cf
newui: blobinfo page

Change-Id: Iecc82e5feac704dfe7e280a6f21a17098a36070b
newui: search page

Change-Id: I42ff3278456b426b0b9dc31c64daee9e6dcd3a8b