Add buffering for all output

Update WebServer::write(uint8_t) to write to a buffer instead of sending
single characters (or short strings) as small packets.  Remove the other
signatures of write so that the base ones in the Print class (which call
write(uint8_t)) are used instead and simplify the writeP/printP
definitions to do this too.

This greatly improves the performance of pages which are built from a
large number of small strings or values at the expense of a small
additional amount of memory (which can be adjusted with the use of a new
macro called WEBDUINO_OUTPUT_BUFFER_SIZE) and also saves ~85 bytes of
flash.
Merge pull request #48 from ribbons/buffer-output

Add buffering for all output to improve performance with many small strings
Update WebServer.h

Hi again. Here is a summary of the changes
- The recent patches did not compile. On Arduino 1.0.5 MAX_SOCK_NUM was missing so I included ethernet.h
- I added back write(const uint8_t *buffer, size_t size) which was removed with the addition of buffering
- I added printf for convenience
- I made reset & flushBuf public. 
I'll continue to use the current version and report any bugs. I think that it may be a good time to up the version number

Thanks
Merge pull request #49 from cat101/patch-3

Update WebServer.h
constructor EthernetClient(MAX_SOCK_NUM) is undocumented and equivalent to EthernetClient() anyway
Merge pull request #51 from ntruchsess/m_client_constructor

constructor m_client(MAX_SOCK_NUM) is not portable (fails to compile with UIPEthernet)
Reduce size and clarify type of some integer vars

Trim down the size of a couple of variables as they didn't need to be as
large, clarify the type of some others, and change port from int to
uint16_t to match EthernetServer.
Put flash strings into separate sections

Change the definition of the P() macro under the AVR architecture to store
the strings in sections named after the variables.  This allows unused
strings to be removed by the linker, saving space in the flash memory.

Also change the variable name for all but one of the instances of failMsg
to give the maximum benefit from the above.
Save flash by only storing the server header once

Modify the functions which send headers to re-use one string containing
the server name instead of including it inline in all of the different
headers.
Merge pull request #52 from ribbons/flash-saving

Flash memory saving optimisations
Add WEBDUINO_COMMANDS_COUNT macro

Add macro for configuring maximum number of commands that can be defined.
This macro replaces hardcoded "8" number.
Merge pull request #54 from mkldon/commands_count

Add WEBDUINO_COMMANDS_COUNT macro
Fix compiler warnings about narrowing conversion

The latest 1.5.7 beta release of Arduino includes an updated toolchain
which now issues warnings about narrowing of ints to chars inside curly
braces becoming ill-formed in C++11.  Explicitly cast the values to char
to prevent this.
Merge pull request #57 from ribbons/compiler-warnings

Fix compiler warnings about narrowing conversion
Merge branch 'master' of https://github.com/sirleech/Webduino

Conflicts:
	WebServer.h