core: improve interrupt save/restore pattern

Combine the declare and save operations into a single macro that is
normally placed at the beginning of the block statement that needs to
preserve the interrupt setting.
resource: add capability

A sort of semaphore/mutex infrastructure allowing resources to be
(recursively or uniquely) locked with notification to a prioritized wait
queue when the resource is released.
core: add missed @defaulted attribute
onewire: reduce critical section width
API change to support issue #62

Describe a new suffix _rh distinct from _ni that indicates a need for
protected access to a resource but not for interrupts being disabled.  Add
some documentation to support this and future API changes.
serial: support _ni to _rh change

Programmatically rename serial functions using the support script.  This
commit does not include a review of the code to enable interrupts around
calls to these functions.  Applied with:

git ls-tree HEAD -r -z --name-only \
 | xargs -0 \
     sed -i -r -f ${BSP430_ROOT}/maintainer/nirh_serial.sed
serial: update to new _rh interface

Anything that mucks with UCSWRST, and the flush operation, must be done with
interrupts disabled.  All other operations can be done under the assumption
the resource is held.
timer: add pulse width measurement infrastructure

Functions and data structures to measure the width of a pulse received on a
timer capture signal.  Somewhat similar to the alarm functionality in that
the interrupt callbacks are registered only when pulse capture is enabled.
Overflow is detected both within the timer peripheral and if the application
does not extract the pulse data before another transition occurs.
Application is notified on overflows and optionally at the start and end of
the pulse.
close #63: missing BSP430_HAL_ISR_CALLBACK_DISABLE_INTERRUPT support

Port and timer interrupts now respect this flag in the return value from
application-provided callbacks.
test_lpm: review documentation and refine alternatives

Two successful modes: turning the supervisor and monitor off (the solution
that worked), and turning everything on (the corrected version of the
solution that didn't work).
serial: review and document SPI clock modes

Much confusion because although CPOL corresponds to MSP430 UCCKPL, CPHA is
the opposite of MSP430 UCCKPH.  Review and document the mode configuration.
Provide a helper constant for M25P similar to that for ChipCon radios.
pmm: Support power savings and faster wakeup

Add a macro to simplify the PMM register manipulation required to turn off
the supervisor and monitor functions that cost energy and add delays during
wakeup.
timer: correct documentation regarding ccidx use
timer: provide access to adjusted overflow count

This is useful when calculating 32-bit counter values within a CC callback
routine.
makeallplat: make this more useful

"make test-platforms" supersedes the original function of this, so
extend it to cover builds for all examples.
pmm: note SVS not supported on FRAM

Also update examples that mistakenly reference SVS unprotected.
periph: change callback typedef name to reflect _ni state

ISR callbacks are always invoked in non-interruptible state.  Make that
more clear by ensuring both the typedef and the struct fields include
the _ni suffix.
resource: refine handling of waiter (documentation and code)

Clearly document that waiter position in queue is only affected by the
initial resource claim.  Also invoke new head callback when the wait list
changes, in case the list changed due to a cancel from within a callback (so
the release is not lost) or from outside (when the new head may recursively
claim the resource).
timer: correct placement of some functional config macros

config*PORT_HAL macros for secondary timer were not with the rest of the
secondary timer functional configuration macros.  Put them there and add
back-links.
syncap: example for synchronous timer capture on both edges

This demonstrates that, on at least one MCU, synchronous capture does
not record the value of the input along with the time at which the input
changed.